ChatAppInbound
Receive mobile-originated (MO) messages via Simple Message Queue (formerly MNS).
Prerequisites
You have an Alibaba Cloud account and an AccessKey pair. For more information, see Create an AccessKey.
You have reviewed the overview and configuration of message receipts and understand their modes, types, and configuration process. Then, configure the message receipts accordingly.
For the procedure of configuring MO messages, see Message receipts and configuration.
Message body format
Parameter | Type | Required | Description |
MessageId | String | Yes | Unique message identifier. |
CustSpaceId | String | Yes | The channel ID. |
WabaId | String | Yes | The ID of the WhatsApp Business Account (WABA). |
From | String | Yes | The sender's phone number. |
To | String | Yes | The recipient's phone number. |
FromUserId | String | No | BSUID |
FromParentUserId | String | No | Parent BSUID (if any) |
FromUserName | String | No | User account (if any) |
Timestamp | Long | Yes | Unix timestamp of the message, in milliseconds. |
DisplayName | String | Yes | The sender's display name. |
Type | String | Yes | Message type. Valid values:
|
Message | String | Yes | Message content.
|
Name | String | Yes | User name. |
LOCATION object
Parameter | Type | Required | Description |
address | String | Yes | Address information. |
latitude | String | Yes | The latitude. |
longitude | String | Yes | The longitude. |
name | String | Yes | Location description. |
VIDEO object
Parameter | Type | Required | Description |
name | String | Yes | Video file description. |
id | String | Yes | The ID of the video file. |
mimeType | String | Yes | Fixed value: Note This parameter can be ignored if |
url | String | Yes | The URL of the video file. Note The URL is valid for 7 days. |
IMAGE object
Parameter | Type | Required | Description |
caption | String | No | Image description. |
id | String | Yes | The ID of the image. |
mimeType | String | Yes | The MIME type of the image. |
url | String | Yes | The URL of the image. Note The URL is valid for 7 days. |
AUDIO object
Parameter | Type | Required | Description |
name | String | Yes | Audio file description. |
id | String | Yes | The ID of the audio file. |
mimeType | String | Yes | Fixed value: Note This parameter can be ignored if |
url | String | Yes | The URL of the audio file. Note The URL is valid for 7 days. |
DOCUMENT object
Parameter | Type | Required | Description |
name | String | Yes | Document description. |
id | String | Yes | The ID of the document. |
filename | String | Yes | Document file name. |
mimeType | String | Yes | Fixed value: |
url | String | Yes | The URL of the document. Note The URL is valid for 7 days. |
REPLY object
Parameter | Type | Required | Description |
text | String | Yes | Text label of the clicked button. |
payload | String | Yes | Payload returned when the user clicks the button. Matches the payload defined in the sent message. |
SYSTEM object
Parameter | Type | Required | Description |
body | String | Yes | A change to the user's identity or phone number. |
wa_id | String | Yes | The user's new WhatsApp ID after a phone number change. |
type | String | Yes | System update type. Valid values:
|
STICKER object
Parameter | Type | Required | Description |
filename | String | Yes | Media name. |
animated | String | Yes | Indicates whether the sticker is animated ( |
id | String | Yes | Media ID. |
mimeType | String | Yes | Media MIME type. |
url | String | Yes | Media URL. |
REVOKE object
Parameter | Type | Required | Description |
revokeMessageId | String | Yes | The message ID of the previously sent message to revoke or delete. |