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_visitor - Controller method name |
token |
REQUIRED |
Application Access Token |
visitor_id |
REQUIRED |
Anonymous(Visiting) Visitor ID |
Response
{
"result": "success",
"language_version": 20171221061942,
"visitor": {
"id": "22",
"site_id": "8",
"operator_id": "5",
"chat_session_id": "0",
"name": "Visitor",
"email": "",
"message": "Hi",
"profile_color": "#f16364",
"ip_address": "47.9.135.154",
"page_url": "http://localhost/chatbull/chatbox/",
"page_title": "Visitor Chatbox",
"meta_data": "[{\"page_title\":\"Visitor Chatbox\",\"page_url\":\"http:\\/\\/localhost\\/chatbull\\/chatbox\\/\"}]",
"latitude": "26.9167000",
"longitude": "75.8167000",
"city": "Jaipur",
"state": "Rajasthan",
"country": "India",
"status": "present",
"last_activity_time": "2018-05-30 02:14:24",
"created_at": "2018-05-30 01:56:54",
"site_name": "Localhost",
"site_url": "localhost",
"operator_name": "Admin",
"operator_profile_color": "#20a15d",
"operator_profile_pic": "",
"operator_profile_picture": ""
}
}
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. |