Get Location Access Token from Agency Token
POST/oauth/locationToken
Generate location OAuth access token from agency OAuth access token.
Request
Version stringrequired
API Version
Available options
2023-02-21- application/x-www-form-urlencoded
- Body
- Example (auto)
Bodyrequired
companyIdstringrequired
Company Id of location you want to request token for
locationIdstringrequired
The location ID for which you want to obtain accessToken
{
"companyId": "tDtDnQdgm2LXpyiqYvZ6",
"locationId": "l1C08ntBrFjLS0elLIYU"
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
access_tokenstring
Location access token which can be used to authenticate & authorize API under following scope
token_typestring
The token type (always Bearer)
expires_innumber
Time in seconds remaining for token to expire
scopestring
Scopes the following accessToken have access to
locationIdstring
Location ID - Present only for Sub-Account Access Token
planIdstring
Plan Id of the subscribed plan in paid apps.
userIdstringrequired
USER ID - Represent user id of person who performed installation
appIdstring
App ID of the installed application
versionIdstring
Version ID of the installed app version
refresh_tokenstring
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"
}