Get Access Token
Debes usar un Access Token válido para acceder a los recursos de PowerLeads (como calendarios, contactos, citas, etc.) en nombre de una empresa o subcuenta específica.
Body
- client_id
(string)— obligatorio
El ID proporcionado por PowerLeads para tu integración. - client_secret
(string)— obligatorio
El secreto del cliente para autenticar la integración. - grant_type
(string)— obligatorio
Define el tipo de autorización.
Valores permitidos:authorization_code,refresh_token - code
(string)— condicional
Código de autorización si estás usandogrant_type = authorization_code. - refresh_token
(string)— condicional
Requerido si estás usandogrant_type = refresh_token. - user_type
(string)— obligatorio
Tipo de token solicitado.
Valores permitidos:Company,Location - redirect_uri
(string)— obligatorio
URI de redirección configurada para tu app.
Ejemplo:https://miapp.com/oauth/callback/powerleads
Responses
Successful response 200
access_token
Example:
stringExample:
ab12dc0ae1234a7898f9ff06d4f69ghtoken_type
Example:
stringExample:
Bearerexpires_in
Example:
numberExample:
86399refresh_token
Example:
stringExample:
xy34dc0ae1234a4858f9ff06d4f66bascope
Example:
stringExample:
conversations/message.readonly conversations/message.writeuserType
Example:
stringExample:
LocationlocationId
Description: Location ID - Present only for Sub-Account Access Token
Example:
stringDescription: Location ID - Present only for Sub-Account Access Token
Example:
l1C08ntBrFjLS0elLIYUcompanyId
Description: Company ID
Example:
stringDescription: Company ID
Example:
l1C08ntBrFjLS0elLIYUapprovedLocations
Description: Approved locations to generate location access token
Example:
array[string]Description: Approved locations to generate location access token
Example:
["l1C08ntBrFjLS0elLIYU"]userId
Description: USER ID - Represent user id of person who performed installation
Example:
string (required)Description: USER ID - Represent user id of person who performed installation
Example:
l1C08ntBrFjLS0elLIYUplanId
Description: Plan Id of the subscribed plan in paid apps
Example:
stringDescription: Plan Id of the subscribed plan in paid apps
Example:
l1C08ntBrFjLS0elLIYURequest Sample: Shell / cURL
curl --request POST \ --url https://services.leadconnectorhq.com/oauth/token \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data client_id= \ --data client_secret= \ --data grant_type=authorization_code \ --data code= \ --data refresh_token= \ --data user_type= \ --data redirect_uri=
Response Example
{ "access_token": "ab12dc0ae1234a7898f9ff06d4f69gh", "token_type": "Bearer", "expires_in": 86399, "refresh_token": "xy34dc0ae1234a4858f9ff06d4f66ba", "scope": "conversations/message.readonly conversations/message.write", "userType": "Location", "locationId": "l1C08ntBrFjLS0elLIYU", "companyId": "l1C08ntBrFjLS0elLIYU", "approvedLocations": [ "l1C08ntBrFjLS0elLIYU" ], "userId": "l1C08ntBrFjLS0elLIYU", "planId": "l1C08ntBrFjLS0elLIYU"}