This API allows you to generate locationAccessToken from AgencyAccessToken.
Request
Headers
Version
string
API Version
Allowed value:
2021-07-28
Body
companyId
string
Company Id of location you want to request token for
locationId
string
The location ID for which you want to obtain accessToken
Responses
200
Successful response
Body
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
USER ID - Represent user id of person who performed installation
Example:
l1C08ntBrFjLS0elLIYU
400
Bad Request
Body
statusCode
number
Example:
400
message
string
Example:
Bad Request
401
Unauthorized
Body
statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized
422
Unprocessable Entity
Body
statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity