Get Visitor

API will return visitor data of chat session.

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 api - Controller directory name
c REQUIRED chat - Controller name
m REQUIRED get_visitor - Controller method name
csid REQUIRED Chat Session ID

Response


{
    "result": "success",
    "language_version": 20171221061942,
    "visitor": {
        "is_typing": "0",
        "id": "143",
        "name": "Site Visitor",
        "email": "site-visitor@vgamil.com",
        "display_name": "Site Visitor",
        "profile_pic": "",
        "profile_color": "#2093cd",
        "role": "visitor",
        "last_activity_time": "2018-05-30 02:47:05",
        "last_login": "0000-00-00 00:00:00",
        "contact_number": "1234546565",
        "profile_picture": null,
        "ip_address": "::1",
        "page_title": "Visitor Chatbox",
        "page_url": "http://localhost/chatbull/chatbox/",
        "meta_data": "[{\"page_title\":\"Visitor Chatbox\",\"page_url\":\"http:\\/\\/localhost\\/chatbull\\/chatbox\\/\"}]",
        "started_at": "2018-05-30 01:30:32",
        "site_name": "Localhost",
        "site_url": "localhost",
        "city": "Jaipur",
        "state": "Rajasthan",
        "country": "India",
        "profilePic": ""
    }
}

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.