All Products
Search
Document Center

Chat App Message Service:ChatAppInbound

Last Updated:Jul 18, 2023

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:

  • TEXT

  • LOCATION

  • DOCUMENT

  • VIDEO

  • AUDIO

  • REPLY

  • IMAGE

  • CONTACTS

Message

String

Yes

The content of the message.

  • If the value of the Type parameter is set to TEXT, the value of the Message parameter is the message content.

  • If the value of the Type parameter is set to LOCATION, the value of the Message parameter specifies a location. For more information, see Parameters that specify a location.

  • If the value of the Type parameter is set to VIDEO, the value of the Message parameter specifies video files that are included in the message. For more information, see Parameters that specify a video.

  • If the value of the Type parameter is set to AUDIO, the value of the Message parameter specifies audio files that are included in the message. For more information, see Parameters that specify an audio.

  • If the value of the Type parameter is set to DOCUMENT, the value of the Message parameter specifies documents that are included in the message. For more information, see Parameters that specify a document.

  • If the value of the Type parameter is set to REPLY, the value of the Message parameter specifies a reply button that is included in the message. For more information, see Parameters that specify a reply button.

  • If the value of the Type parameter is IMAGE, the value of the Message parameter specifies an image that is included in the message. For more information, see Parameters that specify an image.

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.