Customer Accounts API (2.0.0)
Download OpenAPI specification:Download
Customer Accounts API is responsible for the authentication and authorization processes of customers in LiveChat.
Get token details
Retrieve information about an access token. You can provide the token via authorization or a query string.
Authorizations:
query Parameters
code | string Example: code=fra-a:vky95357S7KM1E4dXwv1DQ |
Responses
Response samples
- 200
- 401
{- "access_token": "fra-a:vky95357S7KM1E4dXwv1DQ",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "entity_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "expires_in": 28800,
- "organization_id": "390e44e6-f1e6-0368c-z6ddb-74g14508c2e",
- "token_type": "Bearer"
}
Create a token
Creates a new customer access token.
Authorizations:
Request Body schema: application/json
grant_type required | string Enum: "agent_token" "cookie" "identity_token" Grant type |
client_id required | string <hex> Client ID for which the token is being issued |
redirect_uri | string <url> Redirect URI; it can be used and is required only for |
organization_id | string <uuid> Organization ID for which the token is being issued, required only if |
entity_id | string <uuid> Entity ID for which the token is being issued; the entity (customer) should already exist; it can be used only for |
expires_in | integer <uint64> Access token lifetime (in seconds) |
code | string Code is an identity transfer token; it can be used only for |
code_verifier | string Code verifier, as in OAuth2 PKCE flow; it can be used only for |
Responses
Request samples
- Payload
{- "grant_type": "agent_token",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "organization_id": "390e44e6-f1e6-0368c-z6ddb-74g14508c2e",
- "entity_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "expires_in": 28800,
- "code": "fra-a:vky95357S7KM1E4dXwv1DV",
- "code_verifier": "y4jtqb2noru3vc23pefs"
}
Response samples
- 200
- 401
{- "access_token": "fra-a:vky95357S7KM1E4dXwv1DQ",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "entity_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "expires_in": 28800,
- "token_type": "Bearer",
- "organization_id": "390e44e6-f1e6-0368c-z6ddb-74g14508c2e"
}
Response samples
- 401
{- "oauth_exception": "invalid_request",
- "exception_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
}
Create an identity transfer token
Creates a new identity transfer token, which can be exchanged for a customer access token.
Authorizations:
Request Body schema: application/json
bearer_type required | string Enum: "agent" "customer" Authorization token type; |
customer_id | string <uuid> Customer ID for which the identity transfer token is being issued; the customer should already exist; required only if |
client_id required | string <hex> Client ID for which the token is being issued |
code_challenge | string Code challenge, as in OAuth2 PKCE flow. |
Responses
Request samples
- Payload
{- "bearer_type": "agent",
- "customer_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "code_challenge": "9_r7xBQQ8RJ3NOr0AMDBqASrf5ZT41PG1qjuLEYDs-c"
}
Response samples
- 200
- 401
{- "identity_transfer_token": "fra-a:vky95357S7KM1E4dXwv1DV",
- "expires_in": 3600
}
Create a group token
Creates a new customer access token for a different group within the same organization. Use this token to separate customer identity across groups within one organization, click here for more information.
Authorizations:
path Parameters
organization_id required | string <uuid> Unique organization identifier. |
group_id required | string <uuid> Unique group identifier. |
Request Body schema: application/json
grant_type required | string Enum: "agent_token" "cookie" "identity_token" Grant type |
client_id required | string <hex> Client ID for which the token is being issued |
redirect_uri | string <url> Redirect URI; default: the value of the |
license_id | integer <uint64> License ID for which the token is being issued, required only if |
entity_id | string <uuid> Entity ID for which the token is being issued; the entity (customer) should already exist; it can be used only for |
expires_in | integer <uint64> Access token lifetime (in seconds) |
code | string Code is an identity transfer token; it can be used only for |
code_verifier | string Code verifier, as in OAuth2 PKCE flow; it can be used only for |
Responses
Request samples
- Payload
{- "grant_type": "agent_token",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "license_id": 2491303,
- "entity_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "expires_in": 28800,
- "code": "fra-a:vky95357S7KM1E4dXwv1DV",
- "code_verifier": "y4jtqb2noru3vc23pefs"
}
Response samples
- 200
- 401
{- "access_token": "fra-a:vky95357S7KM1E4dXwv1DQ",
- "client_id": "c6e4f62e2a2dab12531235b12c5a2a6b",
- "entity_id": "3aa138c1-c137-41c6-6b26-cface5857378",
- "expires_in": 28800,
- "token_type": "Bearer"
}