Receiving and Processing MO Messages Sent on Infobip
Function
This interface is invoked to receive and process MO messages sent on Infobip.
Usage Description
Interface Authentication
This authentication mode is used for WhatsApp access through the Infobip integrator.
Instructions:
In the AICC, configure the webhook password in the channel configuration.
The WhatsAppAdapter interface is invoked to add the request header AccountKey to the request. The value of AccountKey is the webhook password.
Request Header Parameters
|
Parameter |
Mandatory or Not |
Type |
Default Value |
Description |
|---|---|---|---|---|
|
Content-Type |
Yes |
String |
None |
The value is fixed at application/json; charset=UTF-8. |
|
AccountKey |
Yes |
String |
None |
Webhook authentication password configured in the channel configuration in the AICC. |
Interface Prototype
|
Method |
POST |
|
|---|---|---|
|
URL |
https://{IP address}:{Port number}/social/on/whatsapp/{whatsAppBsp}/message/{channelId} |
{IP address}:{Port number} indicates the IP address and port number of the NSLB exposed externally. {whatsAppBsp} indicates the integrator. {channelId} indicates the channel ID. |
Request Body Parameters
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
results |
Yes |
Array[] |
User message list. For details, see Table 4. |
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
from |
Yes |
String |
User ID. |
|
to |
Yes |
String |
Channel ID. |
|
integrationType |
Yes |
String |
Social media type. The default value is WHATSAPP. |
|
messageId |
Yes |
String |
Unique code of a user message. |
|
message |
Yes |
JSON object |
Specific message. For details, see Table 5. |
|
contact |
No |
JSON object |
|
Parameter |
Mandatory or Not |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Message type. The value can be text, audio, image, video, or locate. |
|
context |
No |
JSON object |
Message reference. For details, see Table 6. |
|
text |
No |
String |
Text message content. This parameter is available when the message type is text. |
|
url |
No |
String |
Multimedia message. This parameter is available when the message type is audio, video, or image. |
|
caption |
No |
String |
Title of a multimedia message. |
|
address |
No |
String |
Address. |
|
name |
No |
String |
Location name. |
|
latitude |
No |
BigDecimal |
Longitude. This parameter is available when the message type is locate. |
|
longitude |
No |
BigDecimal |
Latitude. This parameter is available when the message type is locate. |
Response Parameters
No response is returned when this interface is invoked.
Example
- Request
POST /social/on/whatsapp/infobip/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 accountkey: ************* content-type: application/json; charset=utf-8 cookie: JSESSION*****#*#*****3 accept: */* {"results":[{"from":"861332442355124","to":"447860099299","integrationType":"WHATSAPP","messageId":"ABGHhhMAdBiDLwIQZRJwPq_Gp8cmkj25SvpCDw","message":{"text":"HUAWEI","type":"TEXT"},"contact":{"name":"soebing2021"}}]}
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