Get Location Access Token from Agency Token
POST/oauth/location-token
This API allows you to generate locationAccessToken from AgencyAccessToken
Request
API Version
v3- application/x-www-form-urlencoded
- Body
- Example (auto)
Bodyrequired
Company Id of location you want to request token for
The location ID for which you want to obtain accessToken
{
"companyId": "tDtDnQdgm2LXpyiqYvZ6",
"locationId": "l1C08ntBrFjLS0elLIYU"
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
Location access token which can be used to authenticate & authorize API under following scope
The token type (always Bearer)
Time in seconds remaining for token to expire
Scopes the following accessToken have access to
Location ID - Present only for Sub-Account Access Token
Plan Id of the subscribed plan in paid apps.
USER ID - Represent user id of person who performed installation
App ID of the installed application
Version ID of the installed app version
The OAuth2 refresh token used to obtain a new access token for this specific location.
{
"access_token": "ab12dc0ae1234a7898f9ff06d4f69gh",
"token_type": "Bearer",
"expires_in": 86399,
"scope": "conversations/message.readonly conversations/message.write",
"locationId": "l1C08ntBrFjLS0elLIYU",
"planId": "l1C08ntBrFjLS0elLIYU",
"userId": "l1C08ntBrFjLS0elLIYU",
"appId": "6578278e879ad2646715ba9c",
"versionId": "6578278e879ad2646715ba9c",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"
}