All Products
Search
Document Center

Chat App Message Service:ChatAppStatus

Last Updated:Oct 31, 2024

Obtains a message receipt by specifying an HTTP URL.

Protocol

Parameter

Description

Protocol

HTTP + JSON

Encoding format

UTF-8

Request

Multiple message receipts may be pushed to an HTTP server at a time.

In the following sample request, MsgFrameType is set to template.

[
    {    
    "Status":"Failed",
    "ErrorDescription":"131026:Receiver is incapable of receiving this message(Message Undeliverable.)",
    "MsgFrameType":"template",
    "TaskId":"202307030171*******9",
    "From":"86131*******8",
    "Timestamp":1691043638000,
    "OriginPhoneNumber":"86130*******8",
    "TemplateCode":"820561547132813184",
    "Type":"TEMPLATE",
    "Language":"id",
    "TemplateName":"wa_otp_v_0_0_3",
    "To":"86138*******8",
    "ErrorCode":"131026",
    "MessageId":"2023078469463703*******3"
    },
    {    
    "Status":"Failed",
    "ErrorDescription":"131026:Receiver is incapable of receiving this message(Message Undeliverable.)",
    "MsgFrameType":"template",
    "TaskId":"202307030171*******9",
    "From":"86131*******8",
    "Timestamp":1691043638000,
    "OriginPhoneNumber":"86130*******8",
    "TemplateCode":"820561547132813184",
    "Type":"TEMPLATE",
    "Language":"id",
    "TemplateName":"wa_otp_v_0_0_3",
    "To":"86137*******8",
    "ErrorCode":"131026",
    "MessageId":"2023078469463703*******3"
    }
]

In the following sample request, MsgFrameType is set to message.

[
    {    
    "Status":"Read",
    "MsgFrameType":"message",
    "Type":"INTERACTIVE",
    "TaskId":"2023068473353098*******8",
    "From":"86131*******8",
    "To":"86138*******8",
    "Timestamp":1691132091000,
    "OriginPhoneNumber":"86131*******8",
    "MessageId":"2023038470553398*******8",
    "ConversationId":"72222201111****",
    "ConversationType": "service"
    },
    {    
    "Status":"Read",
    "MsgFrameType":"message",
    "Type":"INTERACTIVE",
    "TaskId":"2023068473353098*******8",
    "From":"86131*******8",
    "To":"86138*******1",
    "Timestamp":1691132091000,
    "OriginPhoneNumber":"86131*******8",
    "MessageId":"2023038470553398*******8",
    "ConversationId":"72222201111****",
    "ConversationType": "service"
    }
]

Request parameters

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.

Response

After your HTTP server receives a delivery receipt, the HTTP status code in the response must be 200, and the response parameters must be in the following format. Otherwise, the system determines that the delivery receipt failed to be pushed and tries to push the delivery receipt again.

Sample response

{
  "code" : 0,
  "msg" : "Successful"
}

Response parameters

Parameter

Type

Required

Description

code

Number

Yes

The response code.

msg

String

No

The description of the response code.

Retries

After the system fails to push a delivery receipt, it tries to push the delivery receipt again 1 minute later. If this retry fails, the system performs a second retry 5 minutes later. If the system fails to push a delivery receipt for three consecutive times, it no longer retries.