Get Chat Session Data

API will return chat session data with recent-chats, new-requests, offline requests and anonymous_users.

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 session - Controller method name
token REQUIRED Application Access Token
user_id REQUIRED Agent ID
csid REQUIRED Chat Session ID

Response


{
    "result": "success",
    "language_version": 20171221061942,
    "session_status": "open",
    "notifications_counter": 3,
    "unread_session": "",
    "messages_list": [
        {
            "id": "4257",
            "chat_session_id": "349",
            "sender_id": "143",
            "chat_message": "Hi, I am getting issue to manage my wallet.",
            "message_meta": null,
            "message_type": "text",
            "sort_order": "1527643831323",
            "message_status": "read",
            "name": "Site Visitor",
            "display_name": "Site Visitor",
            "email": "site-visitor@vgamil.com",
            "role": "visitor",
            "profile_color": "#2093cd",
            "profile_pic": "",
            "profile_picture": null
        },
        {
            "id": "4258",
            "chat_session_id": "349",
            "sender_id": "5",
            "chat_message": "dadada",
            "message_meta": null,
            "message_type": "text",
            "sort_order": "1527645380186",
            "message_status": "read",
            "name": "Babulal Kumwat",
            "display_name": "Admin",
            "email": "demo@chatbull.in",
            "role": "admin",
            "profile_color": "#20a15d",
            "profile_pic": "",
            "profile_picture": null
        }
    ]
}

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.