POST /ccmessaging/send
Description
Sending channel messages, including connection messages, sending input status messages, session messages, transfer to manual services, and disconnection messages
Method
POST
URI
https://Domain Name/apiaccess/ccmessaging/send.For example,the domain name is service.besclouds.com.
Request
Seq. |
Name |
Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
ccmessaging-token |
string |
True |
ccmessagign-token generated by the applyToken interface |
2 |
x-app-key |
string |
True |
The same as app_key, which uniquely identifies a user, Configuring the ApiFabric Tool |
3 |
Authorization |
string |
True |
Authentication field. The value format is as follows: Bearer +AccessToken in the return values of the tokenByAKSK interface (there is a space after Bearer) |
Seq. |
Name |
Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
reqBody |
True |
Request body |
Response
- Status code: 200
- Status code: 400
Incorrect request:Check the request path and parameters.
- Status code: 401
Unauthorized:1.Check whether you have purchased related services.2.Contact the customer service personnel to check the current status of your account.
- Status code: 404
Request not found: Check the request path.
- Status code: 500
Service failure:Check the values of the parameters in the request.
Error Code
None.
Message Example
- Scene description: Connecting Robots
Request Parameter:
{ "content": "", "controlType": "CONNECT", "from": "session_1619573111751_user_1619573111751", "mediaType": "TEXT", "senderNickname": "user_1619573111751", "sourceType": "CUSTOMER", "timestamp": "1619573122352", "to": "1011577355744904195", "userAgent": null, "senderAvatar": null, "channel": "WEB" }
Response Parameter:
{ "resultCode": "0", "resultDesc": "connect to robot success." }
- Scene description: Talk to Bot Request
Request Parameter:
{ "content": "Version", "controlType": "CHAT", "from": "session_1619573111751_user_1619573111751", "mediaType": "TEXT", "senderNickname": "user_1619573111751", "sourceType": "CUSTOMER", "timestamp": "1619573123199", "to": "1011577355744904195", "userAgent": null, "senderAvatar": null, "channel": "WEB" }
Response Parameter:
{ "resultCode": "0", "resultDesc": "Send message to robot successfully" }
- Scene description: Robot-to-manual request
Request Parameter:
{ "content": "", "controlType": "TRANS2AGENT", "from": "session_1619573111751_user_1619573111751", "mediaType": "TEXT", "senderNickname": "user_1619573111751", "sourceType": "CUSTOMER", "timestamp": "1619573129953", "to": "1011577355744904195", "userAgent": null, "senderAvatar": null, "channel": "WEB" }
Response Parameter:
{ "resultCode": "0", "resultDesc": "transfer from robot to agent success." }
- Scene description: Disconnection request
Request Parameter:
{ "content": "", "controlType": "DISCONNECT", "from": "session_1619573842490_user_1619573842490", "mediaType": "TEXT", "senderNickname": "user_1619573842490", "sourceType": "CUSTOMER", "timestamp": "1619573854156", "to": "1011577355744904195", "userAgent": null, "senderAvatar": null, "channel": "WEB" }
Response Parameter:
{ "resultCode": "0", "resultDesc": "Disconnect robot successfully" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot