0% found this document useful (0 votes)
33 views

Signal RAPI

This document provides instructions and examples for connecting to a SignalR chat service, subscribing to events, getting active conversations, conversation details, updating notifications, and checking login credentials. Key steps include connecting to the SignalR service, invoking the 'SendMessage' method, subscribing to chat events, calling APIs to get conversation lists and details, and authenticating via a login POST request.

Uploaded by

Voucherskart
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Signal RAPI

This document provides instructions and examples for connecting to a SignalR chat service, subscribing to events, getting active conversations, conversation details, updating notifications, and checking login credentials. Key steps include connecting to the SignalR service, invoking the 'SendMessage' method, subscribing to chat events, calling APIs to get conversation lists and details, and authenticating via a login POST request.

Uploaded by

Voucherskart
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

SignalR Base url: https://bmbcosmotest.azurewebsites.

net
SignalR Connection URL: https://bmbcosmotest.azurewebsites.net/api

User Id: 41a87957-01a1-46b4-a4ca-2eacab3cb148


Property Id: e655dab2-987b-4683-ad9b-599814b414b6
Group Id: 73574010-2f33-4b41-8b8a-09d18b025a56

After making connection, invoke ‘SendMessage’ with data.


{
recipient: “41a87957-01a1-46b4-a4ca-2eacab3cb148”,
groupname: [“e655dab2-987b-4683-ad9b-599814b414b6”],
}

With above invocation, user is connected to received events related to propertyId

Then you need to subscribe below events

1. newChatUserMessage – To receive chat message.


2. newChat – To receive new chat initiated.
3. newAgentChat – To received request for Chat from web site users.

Get Active Conversation List


Endpoint: https://dashbff.devtest.bookmebob.com/api/conversations/active
Type: POST
Payload: {"groupId":"73574010-2f33-4b41-8b8a-09d18b025a56","properties":["e655dab2-987b-
4683-ad9b-599814b414b6"],"agent":"41a87957-01a1-46b4-a4ca-2eacab3cb148"}
Response: {
"myConversations": [],
"queueConversations": [],
"botConversations": [
{
"conversationId": "27e77b81-0c80-4bf6-96e2-a1c9776f66cb",
"groupId": "73574010-2f33-4b41-8b8a-09d18b025a56",
"visitorId": "a3ed9198-f20d-428f-a1c2-c1b5544fbe56",
"sessionId": "adc41ebe-0776-4b2b-9715-16ad56455a2f",
"channel": "WebsiteDirectLine",
"startedUtc": "2023-06-01T12:47:48.221Z",
"handedOffToAgent": false,
"language": "en-US",
"tags": [
"Welcome"
],
"metadata": {},
"visitorMessageCount": 1,
"first3Messages": [
{
"messageId": "7f60a237-5b01-42cf-a589-eec8248c77e5",
"timeUtc": "2023-06-01T12:47:48.221Z",
"source": "Visitor",
"content": {
"type": "messages",
"messages": [
"ℹ️Something else"
]
},
"botResponseQueryUsed": null,
"responseTo": null,
"propertyId": "e655dab2-987b-4683-ad9b-599814b414b6",
"intentMatched": "welcome_dialog",
"tags": [
"Welcome"
],
"metadata": {},
"feedback": "None",
"leaveFeedback": ""
}
],
"detail": "ℹ️Something else",
"botConversationId": "FIX7YpVzI1eHR36cqaNpfz-us",
"name": "Jitender kumar",
"email": "[email protected]",
"firstName": "",
"lastName": "",
"zipCode": "",
"phoneNumber": "",
"status": "Opened",
"twilioChatId": "",
"agents": null,
"agentStatus": "None",
"propertyId": "e655dab2-987b-4683-ad9b-599814b414b6"
}
]
}
You will get array of conversation of each type.

Conversation Details:
Endpoint: https://dashbff.devtest.bookmebob.com/api/conversations/get/27e77b81-0c80-4bf6-
96e2-a1c9776f66cb?gid=73574010-2f33-4b41-8b8a-09d18b025a56
Type: GET
Response: {
"conversationId": "27e77b81-0c80-4bf6-96e2-a1c9776f66cb",
"integrationId": "2ddcb06d-8a79-46dc-ab38-367080ca3f78",
"groupId": "73574010-2f33-4b41-8b8a-09d18b025a56",
"visitorId": "a3ed9198-f20d-428f-a1c2-c1b5544fbe56",
"sessionId": "adc41ebe-0776-4b2b-9715-16ad56455a2f",
"propertyId": "e655dab2-987b-4683-ad9b-599814b414b6",
"channel": "WebsiteDirectLine",
"startedUtc": "2023-06-01T12:47:48.7431005Z",
"lastVisitorMessageId": "7f60a237-5b01-42cf-a589-eec8248c77e5",
"lastVisitorMessageSentId": "2023-06-01T12:47:48.221Z",
"handedOffToAgent": false,
"language": "en-US",
"tags": [
"Welcome"
],
"clickedLinks": [],
"metadata": {},
"fullMessages": [
{
"messageId": "7f60a237-5b01-42cf-a589-eec8248c77e5",
"groupId": "27e77b81-0c80-4bf6-96e2-a1c9776f66cb",
"integrationId": "2ddcb06d-8a79-46dc-ab38-367080ca3f78",
"visitorId": "a3ed9198-f20d-428f-a1c2-c1b5544fbe56",
"sessionId": "adc41ebe-0776-4b2b-9715-16ad56455a2f",
"conversationId": "27e77b81-0c80-4bf6-96e2-a1c9776f66cb",
"timeUtc": "2023-06-01T12:47:48.221Z",
"source": "Visitor",
"content": {
"type": "messages",
"messages": [
"ℹ️Something else"
]
},
"botResponseQueryUsed": null,
"responseTo": null,
"intentMatched": "welcome_dialog",
"tags": [
"Welcome"
],
"metadata": {},
"feedback": "None",
"leaveFeedback": ""
}
],
"visitor": {
"ipAddress": "122.160.97.100",
"returningType": "First Time",
"countryChat": "NZ",
"countryVisitor": "India",
"deviceType": "Windows",
"browser": "Chrome",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/113.0.0.0 Safari/537.36/8mqEpSuL-47",
"url": "https://bayviewlodge.weebly.com/",
"referralUrl": "",
"location": "Chandīgarh, Chandigarh, India",
"facebookSenderName": "",
"googleSenderName": "",
"facebookSenderId": "",
"facebookProfilePic": "",
"startedUtc": "2023-05-31T12:40:30.441Z",
"name": "Jitender kumar",
"zipCode": "",
"email": "[email protected]",
"phoneNumber": "",
"consentGiven": "No",
"consentGivenDateTime": "2023-05-10 12:03:45",
"contactId": "",
"latitude": "30.727399826049805",
"longitude": "76.77120208740234",
"whatsAppSenderName": "",
"whatsAppSenderPhoneNumber": ""
},
"messages": [
{
"source": "Visitor",
"sender": true,
"time": "2023-06-01T12:47:48.221Z",
"type": "messages",
"text": "ℹ️Something else",
"feedback": "None",
"leaveFeedback": ""
}
],
"botConversationId": "FIX7YpVzI1eHR36cqaNpfz-us",
"takeControl": true,
"status": "Opened",
"twilioChatId": "",
"avatar": "https://bmbuichatprod.z13.web.core.windows.net/res/wallis.png",
"colours": {
"botBot": "#ffffff",
"botUser": "#ED1566",
"botButton": "#da291c",
"botBackground": "#e9eef4",
"botBotText": "#353f48",
"botUserText": "#ffffff",
"botButtonText": "#da291c",
"suggestionBackground": "#ffffff",
"suggestionText": "#4a5051",
"heroButtonBackground": "#D3D3D3",
"heroButtonText": "#353f48",
"heroButtonBackgroundHover": "#dfcf92",
"heroButtonTextHover": "#353f48"
},
"transferToFaceBook": false,
"agents": null,
"agentStatus": "None"
}

Update Notifications :
EndPoint: https://chatapi.devtest.bookmebob.com /update-notification
Type: ‘Post’
Body: {
"userId":"5a0b1bad-bc67-44b1-8f55-f9f1dbc87562",
"deviceId": “device”,
"notifications":false,
}

Check-login:
EndPoint: https://chatapi.devtest.bookmebob.com /check-login
Type: ‘Post’
Body: {
"username":"[email protected]",
"password":"",
"deviceId": “device”,
"notifications":false,
}
Response:
{"userId":"98b9744a-e0da-4d92-9bf7-1bc361b9a54d","groupId":"73574010-2f33-4b41-8b8a-
09d18b025a56","firstName":"Vivek","lastName":"Sanwal","fullName":"Vivek
Sanwal","username":"[email protected]","email":"[email protected]","hasPin":false,"prop
erties":["-1"],"status":"Active","roles":
["Agent","View"],"phoneNumber":"","onlineStatus":true}
}

You might also like