BadRequestDTO
{
"statusCode": 400,
"message": "Bad Request"
}
UnauthorizedDTO
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
GetAccessCodebodyDto
The ID provided by GHL for your integration
The type of token to be requested
The redirect URI for your application
{
"client_id": "string",
"client_secret": "string",
"grant_type": "authorization_code",
"code": "string",
"refresh_token": "string",
"user_type": "Company",
"redirect_uri": "https://myapp.com/oauth/callback/gohighlevel"
}
GetAccessCodeSuccessfulResponseDto
Location ID - Present only for Sub-Account Access Token
Company ID
Approved locations to generate location access token
USER ID - Represent user id of person who performed installation
Plan Id of the subscribed plan in paid apps.
{
"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"
],
"userId": "l1C08ntBrFjLS0elLIYU",
"planId": "l1C08ntBrFjLS0elLIYU"
}
UnprocessableDTO
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
GetLocationAccessCodeBodyDto
Company Id of location you want to request token for
The location ID for which you want to obtain accessToken
{
"companyId": "string",
"locationId": "string"
}
GetLocationAccessTokenSuccessfulResponseDto
Location access token which can be used to authenticate & authorize API under following scope
Time in seconds remaining for token to expire
Scopes the following accessToken have access to
Location ID - Present only for Sub-Account Access Token
Plan Id of the subscribed plan in paid apps.
USER ID - Represent user id of person who performed installation
{
"access_token": "ab12dc0ae1234a7898f9ff06d4f69gh",
"token_type": "Bearer",
"expires_in": 86399,
"scope": "conversations/message.readonly conversations/message.write",
"locationId": "l1C08ntBrFjLS0elLIYU",
"planId": "l1C08ntBrFjLS0elLIYU",
"userId": "l1C08ntBrFjLS0elLIYU"
}
InstalledLocationSchema
Location ID
Name of the location
Address linked to location
Check if the requested app is installed for following location
{
"_id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"address": "47 W 13th St, New York, NY 10011, USA",
"isInstalled": true
}
GetInstalledLocationsSuccessfulResponseDto
Location ID
Name of the location
Address linked to location
Check if the requested app is installed for following location
Total location count under the company
Boolean to control if user wants app to be automatically installed to future locations
{
"locations": [
{
"_id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"address": "47 W 13th St, New York, NY 10011, USA",
"isInstalled": true
}
],
"count": 1231,
"installToFutureLocations": true
}