Overview
Client Credetnails flow to retrieve an access token for the getTokenAPI API
Request
Method | URL |
---|---|
POST | https://{domain}/sentinel/api/v2/account/{account}/app/token?state={consumer_id} |
Query Parameters
Parameter | Description | Type | Required | Notes |
---|---|---|---|---|
state | LivePerson formated participantId of a specific consumer | string | Required | The retrieved access token is bound to this specific consumer |
Headers
Header | Description |
---|---|
Content-Type | application/x-www-form-urlencoded;charset=UTF-8 |
Body
Parameter | Description | Type | Required | Notes |
---|---|---|---|---|
grant_type | client_credentials | String | Required | Value MUST be set to "client_credentials" |
client_id | installation id provided after application registration | String | Required | |
client_secret | secret provided after application registration | String | Required |
Example:
POST /sentinel/api/v2/account/{accountId}/app/token HTTP/1.1
Host: {sentinel_service_domain}
Content-Type: application/x-www-form-urlencoded
client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials
Response
Response Codes
Code | Response |
---|---|
200 | OK — request for access token succeeded |
400 | Bad request — Problem with body or query parameters |
500 | Internal server error |
Response Body
Attribute name | Description |
---|---|
access_token | token to use as authorization when interacting with the Get Tokens API |
token_type | Always Bearer |
expires_in | The lifetime in seconds of the access token |
Example:
{
"access_token": "eyJraWQiOiJmOGViYWQ5ZC0wNzNjLTQ0ZTItYmIyMC05MDQwZDRlNjBlMjYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMzM4NTMxMyIsImF6cCI6Ijc0MDk4YjZhLWM3OGMtNGEyNC1iZjQzLTA5ZGNlYTJlMDExMyIsImh0dHBzOlwvXC9saXZlcGVyc29uLmNvbVwvY29uc3VtZXJfaWQiOiJ7e3BhcnRpY2lwYW50X2lkfX0iLCJwZXJtaXNzaW9ucyI6W10sInNjb3BlIjoiZGVsZWdhdGVkLnRva2VuLnJlYWQuZXh0ZXJuYWwiLCJpc3MiOiJTZW50aW5lbCIsImV4cCI6MTY5NzQ1Mzc4OCwiaWF0IjoxNjk3NDUwMTg4fQ.cLQJhvI2lKtGvSbrfW4mA6gLfa_lsBXHxH4UeIyJgp_n2QXZ1c6C29PXLsVA1faDZXhHEmmm3TvDaU9kRnxcTwe47PPiw0O4RyqFcP-7fZ4wkeEoKSaMdmUQB9EGhxJ6KWqaxSXtgtzv3aCYMlJ5-ueXXeNYIWi48MMKtjrn2RKR5WJXG9jwuEKxm2oOoNXs3LTY0dfsiChpk88KOKMeU9WMem7beDmjWcZ9TvQ67riR098BsP53G6tTgmVNYLCn3Ad1rR0xjGQBHoPa9HQwm5UZrasl5cyFh_qjXt6yLdAqQZB60ouruDygVrzzBGfmCCWjA-g0sOYenBLDmDz8Bw",
"token_type": "Bearer",
"expires_in": "3600"
}