For the complete documentation index, see llms.txt. This page is also available as Markdown.

上行消息

上行消息

响应参数

字段

数据类型

是否必填

描述

id

String

是

消息Id

accountName

String

是

API账号名称

wabaId

String

是

Waba Id

wamid

String

是

Meta WhatApp消息Id

from

String

是

用户手机号

to

String

是

商户手机号

sendTime

String

是

发送时间,格式:2023-02-22T12:00:00.000Z

customerProfile

JSON

是

用户信息

type

String

是

消息类型; text:文本消息 reaction:表情符号消息 image:图片消息 audio:音频消息 video:视频消息 sticker:贴纸消息 unknown:未知消息 location:位置消息 contacts:联系人消息 button:模板按钮回复消息 interactive:交互式消息/交互按钮回复消息 order:订单消息 system:用户更改号码通知

text

JSON

否

type=text时有值

reaction

JSON

否

type=reaction时有值

image

JSON

否

type=image时有值

audio

JSON

否

type=audio时有值

video

JSON

否

type=video时有值

errors

JSON

否

type=unknown时有值

location

JSON

否

type=location时有值

contacts

JSON

否

type=contacts时有值

button

JSON

否

type=button时有值

system

JSON

否

type=system时有值

context

JSON

否

上下文消息,引用消息回复时有值

text:回复示例

字段

数据类型

是否必填

描述

text.body

String

是

表示回复的内容

reaction:回复示例

字段

数据类型

是否必填

描述

reaction.messageId

String

是

表示引用消息的wamid(原始消息id)

reaction.emoji

String

是

表示回复的表情符号

sendTime

String

是

表示客户发送表情符号的时间

字段

数据类型

是否必填

描述

image.caption

String

是

媒体描述或者标题

image.mimeType

String

是

媒体格式类型:image/jpeg

image.sha256

String

是

媒体资源文件Hash码

image.link

String

是

媒体文件的下载链接

sticker:回复示例

字段

数据类型

是否必填

描述

sticker.mimeType

String

是

表情格式类型:image/webp

sticker.sha256

String

是

表情资源文件Hash码

sticker.link

String

是

表情文件的下载链接

video:回复示例

字段

数据类型

是否必填

描述

video.mimeType

String

是

视频格式类型:video/mp4

video.sha256

String

是

视频资源文件Hash码

video.link

String

是

视频文件的下载链接

Audio:回复示例

字段

数据类型

是否必填

描述

audio.mimeType

String

是

音频格式类型:video/mp4

audio.sha256

String

是

音频资源文件Hash码

audio.link

String

是

音频文件的下载链接

Document:回复示例

字段

数据类型

是否必填

描述

document.mimeType

String

是

文档格式类型:video/mp4

document.sha256

String

是

文档资源文件Hash码

document.link

String

是

文档文件的下载链接

document.caption

String

是

文档描述或标题

document.filename

String

是

文档文件名称

Location:回复示例

字段

数据类型

是否必填

描述

location.latitude

String

是

表示纬度

location.longitude

String

是

表示经度

location.name

String

是

表示位置名称

location.address

String

是

表示地址

Contacts:回复示例

Button:回复示例

客户点击互动消息模板中的快速回复按钮时,系统会发送响应。以下是回调格式示例。

字段

数据类型

是否必填

描述

context.from

String

是

是发送交互式消息的 WhatsApp ID(不带“+”前缀的电话号码)

context.id

String

是

是WhatsApp平台上的原始消息ID。

Unknown:回复示例

您可能会收到未知的消息回调通知。例如,客户可能会给您发送不受支持的消息,如限时消息(在这种情况下,我们会通知客户消息类型不受支持)。

字段

数据类型

是否必填

描述

errors.code

String

是

表示错误码

errors.details

String

是

表示错误详情

errors.title

String

是

表示错误名称

Interactive:回复示例

当用户点击您发送的清单消息中的某一项时,您会收到以下 Webhooks 通知:

字段

数据类型

是否必填

描述

context.from

String

是

是发送交互式消息的 WhatsApp ID(不带“+”前缀的电话号码)

context.id

String

是

是WhatsApp平台上的原始消息ID。

当用户点击您发送的回复按钮时,您会收到以下 Webhooks 通知:

最后更新于