Skip to main content
OAuth 2.0Version: v3New

Get Location Access Token from Agency Token

POST/oauth/location-token

This API allows you to generate locationAccessToken from AgencyAccessToken

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:oauth.write
Auth method:OAuth
Token type:Agency Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Body

companyIdstringrequired

Company Id of location you want to request token for

Example:tDtDnQdgm2LXpyiqYvZ6
locationIdstringrequired

The location ID for which you want to obtain accessToken

Example:l1C08ntBrFjLS0elLIYU

Response

Successful response

access_tokenstring

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

Example:ab12dc0ae1234a7898f9ff06d4f69gh
token_typestring

The token type (always Bearer)

Example:Bearer
expires_innumber

Time in seconds remaining for token to expire

Example:86399
scopestring

Scopes the following accessToken have access to

Example:conversations/message.readonly conversations/message.write
locationIdstring

Location ID - Present only for Sub-Account Access Token

Example:l1C08ntBrFjLS0elLIYU
planIdstring

Plan Id of the subscribed plan in paid apps.

Example:l1C08ntBrFjLS0elLIYU
userIdstringrequired

USER ID - Represent user id of person who performed installation

Example:l1C08ntBrFjLS0elLIYU
appIdstring

App ID of the installed application

Example:6578278e879ad2646715ba9c
versionIdstring

Version ID of the installed app version

Example:6578278e879ad2646715ba9c
refresh_tokenstring

The OAuth2 refresh token used to obtain a new access token for this specific location.

Example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30