API will return list of departments(tags) of the site where visitor chatting.
Resource URL
https://Server Node Environment/index.php
Example : https://api.yourdomain.com/index.php
Resource Information
| Parameters |
Values |
| Resource Format |
JSON |
| Method |
GET |
| Requires authentication? |
Yes |
Request
GET Params
| Parameters |
Mandatory |
Description |
| [Request parameters] |
|
|
| d |
REQUIRED |
desktop - Controller directory name |
| c |
REQUIRED |
chat - Controller name |
| m |
REQUIRED |
departments_list - Controller method name |
| token |
REQUIRED |
Application Access Token |
| csid |
REQUIRED |
Chat Session ID |
Response
{
"result": "success",
"language_version": 20171221061942,
"departments_list": [
{
"id": "1",
"department": "Technical Issues"
},
{
"id": "2",
"department": "Sales"
}
]
}
Messages returned
| HTTP STATUS CODE |
Description |
MESSAGE BODY |
| 200 |
Successfully Return |
Return Json data. |
| 200 |
Error Return |
{"result":"failed","language_version":20171221061942,"error":"Chat Session ID is missing."} |
| 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. |