Get Location Access Token from Agency Token

POST https://services.leadconnectorhq.com/oauth/locationToken

This API allows you to generate locationAccessToken from AgencyAccessToken.

Request

Version
string
required

API Version

Allowed value:
2021-07-28
companyId
string
required

Company Id of location you want to request token for

locationId
string
required

The location ID for which you want to obtain accessToken

Responses

Successful response

access_token
string

Location access token which can be used to authenticate & authorize API under following scope

Example:
ab12dc0ae1234a7898f9ff06d4f69gh
token_type
string
Example:
Bearer
expires_in
number

Time in seconds remaining for token to expire

Example:
86399
scope
string

Scopes the following accessToken have access to

Example:
conversations/message.readonly conversations/message.write
locationId
string

Location ID - Present only for Sub-Account Access Token

Example:
l1C08ntBrFjLS0elLIYU
planId
string

Plan Id of the subscribed plan in paid apps.

Example:
l1C08ntBrFjLS0elLIYU
userId
string
required

USER ID - Represent user id of person who performed installation

Example:
l1C08ntBrFjLS0elLIYU

Bad Request

statusCode
number
Example:
400
message
string
Example:
Bad Request

Unauthorized

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized

Unprocessable Entity

statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity