Skip to main content
Version: v3New

Get Access Token

POST 

/oauth/token

Use Access Tokens to access CRM resources on behalf of an authenticated location/company.

Request

Version stringrequired

API Version

Available optionsv3
application/x-www-form-urlencoded

Bodyrequired

    client_idstringrequired

    The ID provided by CRM for your integration

    client_secretstringrequired

    The client secret provided by CRM for your integration

    grant_typestringrequired

    The OAuth2 grant type — authorization_code, refresh_token, or client_credentials

    Available optionsauthorization_coderefresh_tokenclient_credentials
    codestring

    The authorization code received from the authorization endpoint (required for authorization_code grant)

    refresh_tokenstring

    The refresh token used to obtain a new access token (required for refresh_token grant)

    user_typestring

    The type of token to be requested

    Available optionsCompanyLocation
    redirect_uristring

    The redirect URI for your application

application/json

Successful response

Schema
    access_tokenstring

    The OAuth2 access token

    token_typestring

    The token type (always Bearer)

    expires_innumber

    Time in seconds until the access token expires

    refresh_tokenstring

    The OAuth2 refresh token used to obtain a new access token

    scopestring

    Space-separated list of scopes the access token has access to

    userTypestring

    The user type associated with the token (Location or Company)

    locationIdstring

    Location ID - Present only for Sub-Account Access Token

    companyIdstring

    Company ID

    approvedLocationsstring[]

    Approved locations to generate location access token

    userIdstringrequired

    USER ID - Represent user id of person who performed installation

    planIdstring

    Plan Id of the subscribed plan in paid apps.

    isBulkInstallationboolean

    Indicates whether the installation was performed as a bulk installation

    installToFutureLocationsboolean

    Boolean to control if user wants app to be automatically installed to future locations (only for company tokens)

    approveAllLocationsboolean

    Boolean indicating if user approved all locations during bulk installation (only for company tokens)