API will accept online request and add operator to chat session. It will also return settings with this.
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 |
api - Controller directory name |
c |
REQUIRED |
chat - Controller name |
m |
REQUIRED |
accept_online_request - Controller method name |
token |
REQUIRED |
Application Access Token |
request_id |
REQUIRED |
Request ID |
Response
{
"result": "success",
"language_version": 20171221061942,
"settings": {
"enable_canned_messages": "yes",
"enable_agent_initiate_chats": "yes",
"enable_agent_file_sharing": "yes",
"agent_allowed_filetypes": ".pdf|.docx|.txt|.gif|.jpg|.png",
"agent_file_upload_size": "500",
"admin_panel_logo": "http://yoursite.com/chatbull/assets/cmodule/images/logo.png",
"admin_panel_name": "ChatBull",
"agent_time_interwal": "4",
"operator_chat_theme": "bubbles-boom",
"admin_panel_email": "admin@yoursite.com",
"plugin_validated": "yes"
}
}
Messages returned
HTTP STATUS CODE |
Description |
MESSAGE BODY |
200 |
Successfully Return |
Return Json data. |
200 |
Error Return |
{"result":"failed","language_version":20171221061942,"error":"Request has been accepted by another agent"} |
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. |