Token Generation
Generate a Bearer authentication token for Contact Center API access.
The Temporary Authorization token can be obtained through a browser by logging in as the admin user of the specific Contact Center instance. Once you have the credentials, encode them using Base64 (username:password) to use with the API.
HTTP Request​
POST https://<IP_Domain_Name>:<port>/configuration/basicauth
Request Headers​
| Header | Value |
|---|---|
accept | application/json |
Content-Type | application/json |
Authorization | Bearer <existing_token> |
Request Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
username | String | Yes | The unique identifier for the user account making the API request. This user must have appropriate permissions to perform the requested actions. |
password | String | Yes | The authentication password associated with the provided username. Transmit over HTTPS. |
context | String | Yes | Defines the specific application or service module the API call is intended for. For all contact center operations, set this to "ContactCenter". |
contextId | String | Yes | The unique ID of the specific contact center instance or tenant you are targeting. Ensures the request is routed to the correct environment. |
dateExpiry | String | No | ISO 8601 timestamp specifying when the session or token will expire. If not provided, a default session timeout applies. Example: "2030-05-19T12:20:57.310Z" |
userRole | String | Yes | Defines the permission level of the user making the request. Determines which actions the user is authorized to perform. Example: "Administrator" |
Example Request​
curl --location 'https://<IP_Domain_Name>:<port>/configuration/basicauth' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <existing_token>' \
--data '{
"username": "customer_manager",
"password": "customer_manager@123",
"context": "ContactCenter",
"contextId": "1",
"dateExpiry": "2030-05-19T12:20:57.310Z",
"userRole": "Administrator"
}'
Base64 Encoding​
To create a token, credentials need to be encoded using Base64 in the format username:password. For example:
customer_manager:customer_manager@123$
You can use an online tool like Base64 Encode for this purpose.
HTTP Response​
On success, the HTTP response status code will be 200. The response returns a Bearer token to use in subsequent API calls.
HTTP Status Codes​
| Code | Description |
|---|---|
200 | Success — Token generated |
400 | Bad Request — Invalid input or malformed request |
401 | Unauthorized — Missing or invalid credentials |
403 | Forbidden — User not permitted to access this resource |
500 | Internal Server Error |