Login Token V3
To make a Connly SDK connection you need to generate a user token. The user token can be generated using email id and password. Make a POST request to the below base URL to generate the unique user token.
Base URL
Send your POST method request with valid parameters, to the following base URL.
https://api.connle.com/agent/login
Required Parameters
These are the required POST method parameters with description
| Parameter Name | Type | Description |
|---|---|---|
| email_id | string | Your email id |
| password | string | Your user password |
Note
All the above parameters are mandatory.
Sample JSON Request
Below is the following sample JSON POST method request
{
"email_id":"user@example.com",
"password": "admin@123"
}
Sample Response
If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below
{
"code": 200,
"msg": "Login successful",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZ2VudF9pZCI6IjUxNTlfMjIyNDI1NyIsImluZXRfbm8iOjIyMjQyNTcsImVtYWlsX2lkIjoiYmFsYUB0ZXN0LmNvbSIsInVzZXJfaWQiOiI5NDU4ZDg0Mi1mN2Y3LTQ3ZTEtYjUyYi0zOTNjZmI0ZjI4OTMiLCJvcmdfaWQiOiIwZDk2OTQ1MC01NDAzLTExZWMtYTNlMS1kN2QyYmUwOTVmZTEiLCJpYXQiOjE3ODM5Mzk3MTQsImV4cCI6MTc4NDExMjUxNH0.wZ8F1WeDbwMMvaCqlF6KLxq7TRvJ3gF0isRH45UqjAQ"
}
Properties
These are the list of properties and its description
| Property | Type | Description |
|---|---|---|
| msg | string | Login status message |
| token | string | Your user unique token |
Note
Token will automatically expire after 2 days.
HTTP Status Codes
TeleCMI API platform represents the following status codes to identify the errors.
| Status code | Status Type | Description |
|---|---|---|
| 200 | OK | Login successful |
| 202 | Accepted | 2FA is enabled. Please complete 2FA verification |
| 400 | Bad Request | Invalid input. Please check your data and try again |
| 401 | Unauthorized | Incorrect password, please try again. Remaining attempts: {n} |
| 403 | Forbidden | Account blocked / Too many failed attempts |
| 404 | Not Found | User not found, please enter a valid user email |
| 429 | Too Many Requests | Too many login attempts |
| 498 | Invalid Token | Token is invalid or expired |
| 500 | Internal Server Error | Internal server error |