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 |
anonymous_chat - Controller name |
m |
REQUIRED |
get_messages - Controller method name |
token |
REQUIRED |
Application Access Token |
visitor_id |
REQUIRED |
Anonymous(Visiting) Visitor ID |
Response
{
"result": "success",
"language_version": 20171221061942,
"notifications_counter": 3,
"unread_session": "",
"messages_list": [
{
"id": "4",
"temp_visitor_id": "22",
"sender_id": "5",
"local_id": "awb51527645616258",
"sort_order": "1527645616258",
"chat_message": "Hello",
"message_status": "unread",
"created_at": "2018-05-30 02:00:16"
},
{
"id": "5",
"temp_visitor_id": "22",
"sender_id": "5",
"local_id": "awb51527645626125",
"sort_order": "1527645626125",
"chat_message": "How can i help you",
"message_status": "unread",
"created_at": "2018-05-30 02:00:26"
}
]
}
Messages returned
HTTP STATUS CODE |
Description |
MESSAGE BODY |
200 |
Successfully Return |
Return Json data. |
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. |