Updated on 2024-03-05 GMT+08:00

sendMsgReq

Table 1 sendMsgReq Parameters

Seq.

Name

Type

Mandatory

Description

1.1

channel

string

True

Type of the channel through which the client sends messages.For example, access through the web channel (WEB).

1.2

content

string

True

Message content, which is determined by mediaType. For example, if mediarrType is set to TXT, content indicates the text content. For media such as audio and video, the value of content is the same as that of fileId. The file download interface uses this fileId to download files.

1.3

controlType

string

True

Message control type, such as connect(CONNECT) chat (CHAT) and disconnect (DISCONNECT),Transfer to manual service(TRANS2AGENT),Entering(INPUT)

1.4

from

string

True

ID of the user who sends a message through the channel.

1.5

mediaType

string

True

Message media type,such as text type (TEXT)

1.6

senderNickname

string

False

Nickname of the message sender.

1.7

sourceType

string

True

Message source type.

1.8

timestamp

string

False

Time when a message is sent.

1.9

to

string

True

Channel configuration ID.

1.10

userAgent

string

False

User client type, which is obtained from the UserAgent.

1.11

senderAvatar

string

False

Avatar of the message sender. The WeChat avatar URL is transmitted through the WeChat channel.