Skip to main content
POST
/
oauth
/
token
Get Access Token
curl --request POST \
  --url https://services.leadconnectorhq.com/oauth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'client_id=<string>' \
  --data 'client_secret=<string>' \
  --data grant_type=authorization_code \
  --data 'code=<string>' \
  --data 'refresh_token=<string>' \
  --data user_type=Location \
  --data redirect_uri=https://myapp.com/oauth/callback/hoopai
{
  "userId": "l1C08ntBrFjLS0elLIYU",
  "access_token": "ab12dc0ae1234a7898f9ff06d4f69gh",
  "token_type": "Bearer",
  "expires_in": 86399,
  "refresh_token": "xy34dc0ae1234a4858f9ff06d4f66ba",
  "scope": "conversations/message.readonly conversations/message.write",
  "userType": "Location",
  "locationId": "l1C08ntBrFjLS0elLIYU",
  "companyId": "l1C08ntBrFjLS0elLIYU",
  "approvedLocations": [
    "l1C08ntBrFjLS0elLIYU"
  ],
  "planId": "l1C08ntBrFjLS0elLIYU",
  "isBulkInstallation": "Bearer"
}

Authorizations

Authorization
string
header
required

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

Body

application/x-www-form-urlencoded
client_id
string
required

The ID provided by HoopAI for your integration

client_secret
string
required
grant_type
enum<string>
required
Available options:
authorization_code,
refresh_token,
client_credentials
code
string
refresh_token
string
user_type
enum<string>

The type of token to be requested

Available options:
Company,
Location
Example:

"Location"

redirect_uri
string

The redirect URI for your application

Example:

"https://myapp.com/oauth/callback/hoopai"

Response

Successful response

userId
string
required

USER ID - Represent user id of person who performed installation

Example:

"l1C08ntBrFjLS0elLIYU"

access_token
string
Example:

"ab12dc0ae1234a7898f9ff06d4f69gh"

token_type
string
Example:

"Bearer"

expires_in
number
Example:

86399

refresh_token
string
Example:

"xy34dc0ae1234a4858f9ff06d4f66ba"

scope
string
Example:

"conversations/message.readonly conversations/message.write"

userType
string
Example:

"Location"

locationId
string

Location ID - Present only for Sub-Account Access Token

Example:

"l1C08ntBrFjLS0elLIYU"

companyId
string

Company ID

Example:

"l1C08ntBrFjLS0elLIYU"

approvedLocations
string[]

Approved locations to generate location access token

Example:
["l1C08ntBrFjLS0elLIYU"]
planId
string

Plan Id of the subscribed plan in paid apps.

Example:

"l1C08ntBrFjLS0elLIYU"

isBulkInstallation
boolean
Example:

"Bearer"

Last modified on March 7, 2026