All Products
Search
Document Center

Chat App Message Service:ChatAppStatus

Last Updated:Sep 26, 2024

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:

  • Sent: The message was sent.

  • Delivered: The message was delivered to the receiver.

  • Read: The message was read by the receiver.

  • Failed: The message failed to be sent.

  • Deleted: The message was deleted by the receiver.

    Note

    The Deleted state is unavailable because WhatsApp does not return the Deleted state to ChatApp Message Service for now.

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:

  • service: user-initiated conversation

  • utility: utility conversation

  • marketing: marketing conversation

  • authentication: authentication conversation

ConversationId

String

No

The conversation ID.

MsgFrameType

String

Yes

The message type. Valid values:

  • message: a custom message. You can send a custom message to a user only within 24 hours after you receive the last message from the user.

  • template: a template message. A template message is sent based on a template that is created and approved in the ChatApp Message Service console. You can send template messages without a time limit.

Type

String

No

The type of the media resources that are included in the message. Valid values:

  • image

  • video

  • document

  • audio

  • none

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.