Skip to main content

Login API

Authenticate and create a session for Contact Center v4 API access.

HTTP Request​

POST /v4/accounts/<account_sid>/login

Base URL​

Data CenterBase URL
Singaporehttps://ccm-api.exotel.com
Mumbaihttps://ccm-api.in.exotel.com

Request Headers​

HeaderValue
Content-Typeapplication/json

Request Body​

{
"username": "your_api_key",
"password": "your_api_token",
"account_sid": "your_account_sid"
}
ParameterTypeRequiredDescription
usernameStringYesAPI key from Exotel Dashboard
passwordStringYesAPI token from Exotel Dashboard
account_sidStringYesYour Exotel account SID

Example Request​

curl -X POST \
'https://ccm-api.exotel.com/v4/accounts/<account_sid>/login' \
-H 'Content-Type: application/json' \
-d '{
"username": "your_api_key",
"password": "your_api_token",
"account_sid": "your_account_sid"
}'

Response​

{
"request_id": "req_login_001",
"method": "POST",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"data": {
"session_token": "sess_abc123def456...",
"expires_at": "2024-06-16T10:30:00.000Z",
"user": {
"user_id": "user_001",
"name": "Admin User",
"role": "admin"
}
}
}
}

Using the Session Token​

Include the session token in subsequent v4 API calls:

curl -X GET \
'https://ccm-api.exotel.com/v4/accounts/<account_sid>/users' \
-H 'Authorization: Bearer <session_token>'

HTTP Status Codes​

CodeDescription
200Success — Authenticated
401Unauthorized — Invalid credentials
403Forbidden — Account not enabled for CCM
429Rate Limited
500Internal Server Error

Try It​