Skip to main content
POST
/
oauth
/
locationToken
Get Location Access Token from Agency Token
curl --request POST \
  --url https://services.leadconnectorhq.com/oauth/locationToken \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Version: <version>' \
  --data 'companyId=<string>' \
  --data 'locationId=<string>'
{
  "userId": "l1C08ntBrFjLS0elLIYU",
  "access_token": "ab12dc0ae1234a7898f9ff06d4f69gh",
  "token_type": "Bearer",
  "expires_in": 86399,
  "scope": "conversations/message.readonly conversations/message.write",
  "locationId": "l1C08ntBrFjLS0elLIYU",
  "planId": "l1C08ntBrFjLS0elLIYU"
}

Authorizations

Authorization
string
header
required

Access Token or Private Integration Token

Headers

Version
enum<string>
required

API Version

Available options:
2021-07-28

Body

application/x-www-form-urlencoded
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

Response

Successful response

userId
string
required

USER ID - Represent user id of person who performed installation

Example:

"l1C08ntBrFjLS0elLIYU"

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"

Last modified on March 7, 2026