This API returns if there is any agent online along with a list of agents. However, the agents list depends on the settings saved in the DB through Admin Panel.
Resource URL
https://Server Node Environment/index.php
Example : https://api.yourdomain.com/index.php
Request
GET Params
| Parameters |
Mandatory |
Description |
| [Request parameters] |
|
|
| d |
REQUIRED |
visitors - Controller directory name |
| c |
REQUIRED |
chat - Controller name |
| m |
REQUIRED |
get_online_agents - Controller method name |
Headers
| Parameters |
Mandatory |
Description |
| Accesstoken |
REQUIRED |
Access Token |
Response
{
"error": "",
"result": "success",
"is_agents_online": true,
"agents_list": [],
"data": {
"anonymous_visitor": {
"id": "8",
"site_id": "8",
"operator_id": "0",
"chat_session_id": "0",
"name": "Babulal Kumawat",
"email": "babulal@testing.com",
"message": "I am a regular user of your site.",
.......................
},
"anonymous_messages": []
}
}
Messages returned
| HTTP STATUS CODE |
Description |
MESSAGE BODY |
| 200 |
Successfully Return |
Return data in JSON format. |
| 200 |
Authorization Error |
{"result":"failed","error":"Invalid access token or Token has been expired."} |
| 400 |
Request is malformed |
{"error": "invalid_request", "error_description": "description"} |
| 403 |
Forbidden |
Directory access is forbidden. |
| 404 |
Resource Not found |
The page you requested was not found. |