Obtains MO messages by using a message queue in ChatApp Message Service.
Prerequisites
An Alibaba Cloud account is created and an AccessKey pair is created for the Alibaba Cloud account. For more information, see Create an AccessKey pair.
You read Configure message receipts and understand the format, type, and configuration process of message receipts.
Parameters that are included in the message body of a message receipt
Parameter | Type | Required | Description |
MessageId | String | Yes | The ID of the message. |
From | String | Yes | The phone number of the message sender. |
To | String | Yes | The phone number of the message receiver. |
Timestamp | Long | Yes | The timestamp is a Unix timestamp in milliseconds. |
DisplayName | String | Yes | The display name of the sender. |
Type | String | Yes | The type of the media resources that are included in the message. Valid values:
|
Message | String | Yes | The content of the message.
|
Name | String | Yes | The name of the end user. |
Location fields
Field | Type | Required | Description |
address | String | Yes | The address. |
latitude | String | Yes | The latitude of the location. |
longitude | String | Yes | The longitude of the location. |
name | String | Yes | The description of the location. |
Video fields
Field | Type | Required | Description |
name | String | Yes | The description of the video. |
id | String | Yes | The ID of the video file. |
mimeType | String | Yes | Set the value to ogg. Note If the codecs parameter is set to opus, this parameter is optional. |
url | String | Yes | The URL of the video file. |
Image fields
Field | Type | Required | Description |
caption | String | No | The description of the image. |
id | String | Yes | The ID of the image file. |
mimeType | String | Yes | The type of the image. |
url | String | Yes | The URL of the image. |
Audio fields
Field | Type | Optional | Description |
name | String | Yes | The description of the audio. |
id | String | Yes | The ID of the audio file. |
mimeType | String | Yes | Set the value to audio. Note If the codecs parameter is set to opus, this parameter is optional. |
url | String | Yes | The URL of the audio file. |
Document fields
Field | Type | Optional | Description |
name | String | Yes | The description of the document. |
id | String | Yes | The ID of the document. |
filename | String | Yes | The file name of the document. |
mimeType | String | Yes | Set the value to application/pdf. |
url | String | Yes | The URL of the document. |
Reply fields
Field | Type | Optional | Description |
text | String | Yes | The name of the button that the receiver can click. |
payload | String | Yes | The payload of the reply message that is sent after the receiver clicks the reply button. |