API will return settings in JSON formated Object. This settings object will be used to initialize chatbox window on the website.
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 |
visitors - Controller directory name |
| c |
REQUIRED |
chatbox - Controller name |
| m |
REQUIRED |
settings_json - Controller method name |
| token |
REQUIRED |
Access Token for authentication picked from widget code |
Response
{
"current_version": "1.0.0",
"current_product_name": "product_name",
"enable_agent_initiate_chats": "yes",
"chat_status": "enable",
"time_interwal": "3",
"chat_mode": "online"
........
}
Messages returned
| HTTP STATUS CODE |
Description |
MESSAGE BODY |
| 200 |
Successfully Return |
Return settings 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. |