Obtains a message receipt by using a Simple Message Queue (formerly MNS) queue.
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 receipt
Parameter | Type | Required | Description |
MessageId | String | Yes | The message ID. |
From | String | Yes | The phone number of the message sender. |
To | String | Yes | The phone number of the message receiver. |
Timestamp | Long | Yes | The time when the message was sent. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
Status | String | Yes | The state of the message. Valid values:
|
StatusDescription | String | Yes | The description of the message state. |
ErrorCode | String | No | The error code. |
ErrorDescription | String | No | The description of the error code. For more information, see Error codes. |
ConversationType | String | No | The conversation type. Valid values:
|
ConversationId | String | No | The conversation ID. |
MsgFrameType | String | Yes | The message type. Valid values:
|
Type | String | No | The type of the media resources that are included in the message. Valid values:
|
TaskId | String | No | The task ID. Default value: MessageId. Note If you do not specify TaskId, the default value MessageId is used. |
OriginPhoneNumber | String | No | The real number of the message sender. |
TemplateCode | String | No | The message template code. Note The value of TemplateCode is automatically generated if MsgFrameType is set to template. |