Interface for Receiving and Processing Upstream Messages Sent by KooMessage
Function
This interface is invoked to receive and process upstream messages sent by KooMessage.
Usage Description
Interface Authentication
This authentication mode is used for WhatsApp access through the KooMessage integrator.
Instructions:
In the AICC, the webhook password is configured on the Channel Configuration page.
The request header Authorization is added to the request and the WhatsAppAdapter interface is invoked. The value of Authorization is the webhook password.
Request Header Parameters
|
Parameter |
Mandatory |
Type |
Default Value |
Description |
|---|---|---|---|---|
|
Content-Type |
Yes |
String |
None |
The value is fixed at application/json; charset=UTF-8. |
|
Authorization |
Yes |
String |
None |
Webhook authentication password configured on the Channel Configuration page in the AICC. |
Interface Prototype
|
Method |
POST |
|
|---|---|---|
|
URL |
https://IP address:Port number/social/on/whatsapp/koomessage/message/{channelId} |
IP address:Port number indicates the IP address and port number of the NSLB exposed externally. {channelId} indicates the channel ID. |
Request Body Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
sender |
Yes |
String |
Merchant mobile number. |
|
user_number |
Yes |
String |
Customer mobile number. |
|
user_name |
Yes |
String |
Username. |
|
timestamp |
Yes |
String |
Timestamp, in seconds. |
|
message_id |
Yes |
String |
Message ID. |
|
message_type |
Yes |
String |
Type of messages that can be received. 1. text 2. image 3. video 4. audio 5. document 6. location 7. interactive_button_reply 8. interactive_list_reply 9. button |
|
context |
Yes |
object |
Reference message. For details, see Table 4. |
|
message |
Yes |
object |
Inbound message. For details, see Table 5. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
text |
No |
String |
Text message content. This parameter is mandatory when message_type is set to text. |
|
url |
No |
String |
Media file URL. This parameter is mandatory when message_type is set to image, audio, video, or document. |
|
caption |
No |
String |
Description. This parameter is mandatory when message_type is set to image, audio, or document. |
|
filename |
No |
String |
File name. This parameter is mandatory when message_type is set to document. |
|
payload |
No |
String |
Load. This parameter is mandatory when message_type is set to button. |
|
title |
No |
String |
Returned content of an interactive message. This parameter is mandatory when message_type is set to interactive_button_reply or interactive_list_reply. |
|
longitude |
No |
String |
Longitude. This parameter is mandatory when message_type is set to location. |
|
latitude |
No |
String |
Latitude. This parameter is mandatory when message_type is set to location. |
|
name |
No |
String |
Address name. This parameter is mandatory when message_type is set to location. |
|
address |
No |
String |
Detailed address. This parameter is mandatory when message_type is set to location. |
Response Parameters
No response is returned when this interface is invoked.
Example
- Request
POST /social/on/whatsapp/koomessage/message/202105102694809992 host: 10.10.10.2:18446 connection: Keep-Alive x-forwarded-for: 10.10.10.3, 10.10.10.4 x-real-ip: 10.10.10.5 content-length: 401 remote-host: 10.10.10.6 user-agent: java/socket Authorization: ************* content-type: application/json; charset=utf-8 accept: */* { "sender" : "86173xxxx4526", "timestamp" : "1719318962", "message" : { "text" : "this is text message" }, "user_number" : "86187xxxx5632", "user_name" : "user_name", "message_id" : "110630e87b3a49b382cc30b5c9a508366", "message_type" : "text" }
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