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 usando grant_type = authorization_code.
  • refresh_token (string)condicional
    Requerido si estás usando grant_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 string
Example: ab12dc0ae1234a7898f9ff06d4f69gh
token_type string
Example: Bearer
expires_in number
Example: 86399
refresh_token string
Example: xy34dc0ae1234a4858f9ff06d4f66ba
scope string
Example: conversations/message.readonly conversations/message.write
userType string
Example: Location
locationId string
Description: Location ID - Present only for Sub-Account Access Token
Example: l1C08ntBrFjLS0elLIYU
companyId string
Description: Company ID
Example: l1C08ntBrFjLS0elLIYU
approvedLocations array[string]
Description: Approved locations to generate location access token
Example: ["l1C08ntBrFjLS0elLIYU"]
userId string (required)
Description: USER ID - Represent user id of person who performed installation
Example: l1C08ntBrFjLS0elLIYU
planId string
Description: Plan Id of the subscribed plan in paid apps
Example: l1C08ntBrFjLS0elLIYU
 

Request 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"
}

 


¿Este artículo fue útil?