← OAuth 2.0

Get Access Token

Use access tokens to access Revo Digital resources on behalf of an authenticated sub-account/company. Exchange an authorization code or refresh token for a new access token.

POST/oauth/token
Scope
Auth Method
Client Credentials
Token Type
Company / Location

Body Parameters

ParameterTypeDescription
client_idrequiredstringThe Client ID provided by Revo Digital for your integration.
client_secretrequiredstringThe Client Secret provided by Revo Digital for your integration.
grant_typerequiredstringThe type of token to be requested.
Possible values: authorization_code, refresh_token, client_credentials
codestringThe authorization code received after user authorization. Required when grant_type is authorization_code.
refresh_tokenstringThe refresh token from a previous token response. Required when grant_type is refresh_token.
user_typestringThe type of user token to request.
Possible values: Company, Location
redirect_uristringThe redirect URI registered for your application. Required for authorization_code grant.
Example Request — Authorization CodecURL
curl -X POST \
  'https://services.leadconnectorhq.com/oauth/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'client_id=YOUR_CLIENT_ID' \
  -d 'client_secret=YOUR_CLIENT_SECRET' \
  -d 'grant_type=authorization_code' \
  -d 'code=AUTHORIZATION_CODE' \
  -d 'redirect_uri=https://yourapp.com/callback' \
  -d 'user_type=Location'
Example Request — Refresh TokencURL
curl -X POST \
  'https://services.leadconnectorhq.com/oauth/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'client_id=YOUR_CLIENT_ID' \
  -d 'client_secret=YOUR_CLIENT_SECRET' \
  -d 'grant_type=refresh_token' \
  -d 'refresh_token=REFRESH_TOKEN' \
  -d 'user_type=Location'

Response — 200 OK

Example ResponseJSON
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 86400,
  "refresh_token": "cj0rMTIzNDU2Nzg5...",
  "scope": "contacts.readonly contacts.write ...",
  "locationId": "ve9EPM428h8vShlRW1KT",
  "companyId": "5DP41231LkQsiKESj6rh",
  "approvedLocations": ["ve9EPM428h8vShlRW1KT"],
  "userId": "usr_abc123",
  "planId": "plan_xyz789",
  "installToFutureLocations": true,
  "approvedAllLocations": false
}

Response Fields

ParameterTypeDescription
access_tokenstringThe access token to use for API requests.
token_typestringAlways "Bearer".
expires_inintegerTime in seconds until the token expires (typically 86400 = 24 hours).
refresh_tokenstringA refresh token to obtain a new access token when the current one expires.
scopestringSpace-separated list of scopes the token has access to.
locationIdstringLocation ID — present only for Sub-Account access tokens.
companyIdstringCompany ID associated with the token.
approvedLocationsstring[]Approved locations to generate location access tokens for.
userIdstringUser ID of the person who performed the installation.
planIdstringPlan ID of the subscribed plan (paid apps only).
installToFutureLocationsbooleanWhether the user wants the app auto-installed to future locations (company tokens only).
approvedAllLocationsbooleanWhether the user approved all locations during bulk installation (company tokens only).

Token Refresh

Access tokens expire after 24 hours. Use the refresh_token with grant_type=refresh_token to obtain a new access token without requiring the user to re-authorize. Refresh tokens are single-use — each refresh response includes a new refresh token.