跳转到主要内容
GET
从指定的聊天室获取消息

授权

Authorization
string
header
必填

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

请求头

X-Device-Id
string

多设备支持的设备标识符。 当多个设备被注册时需要. 如果只有一个设备被注册,它将被用作默认。 也可以以 device_id 查询参数提供。

示例:

"my-device-id"

路径参数

chat_jid
string
必填

聊天 JID (e.g. phone@s.whatsapp.net for individ或groupid@g.us for group). 接受百分比编码值(如组%40g.us)。

查询参数

limit
integer
默认值:50

返回消息的最大数量

必填范围: x <= 100
offset
integer
默认值:0

要跳过的消息数量 (用于分页)

start_time
string<date-time>

过滤来自此时间戳的消息 (ISO 8601 格式)

end_time
string<date-time>

在此时间戳之前过滤消息 (ISO 8601 格式)

media_only
boolean
默认值:false

仅返回带有媒体内容的消息

is_from_me
boolean

按发件人过滤消息(您发送的消息为 true,对于收到的消息为 false)。 当提供了唯一的媒体=true 和 isFromMe=false 时,介质仅优先,并且将返回所有媒体信息,而不论发送者为何。

按内容文本搜索消息

响应

好的

code
string
示例:

"SUCCESS"

message
string
示例:

"Success get chat messages"

results
object