参数 | 说明 | 类型 |
---|---|---|
appId | 应用id | String |
channelType | 通道类型:0-WhatsApp,默认送0; | Integer |
messageId | 消息id(上行消息) | String |
timestamp | 消息推送的时间,时间戳(秒级) | Long |
eventType | 事件类型:up-message-event(上行消息事件)。 | String |
businessPhone | 商家号码 | String |
from | Object | |
phone | 用户号码 | String |
name | 用户名称 | String |
message | 消息对象 | Object |
type | 支持接收的消息类型:text(文本)、image(图片)、video(视频)、audio(音频)、document(文档)、location(位置)、sticker(贴图表情)、unknown(未知)、unsupported(不支持)。 | String |
text | type=text时,文本对象 | Object |
body | 文本内容 | String |
image | type=image时,图片对象 | Object |
filePath | 媒体链接 | String |
mimeType | 图片类型 | String |
id | 媒体id | String |
sha256 | SHA256hash | String |
caption | 说明 | String |
video | type=video时,视频对象 | Object |
filePath | 媒体链接 | String |
mimeType | 视频类型 | String |
id | 媒体id | String |
sha256 | SHA256hash | String |
caption | 说明 | String |
filename | 文件名 | String |
audio | type=audio时,音频对象 | Object |
filePath | 媒体链接 | String |
mimeType | 音频类型 | String |
id | 媒体id | String |
sha256 | SHA256hash | String |
document | type=document时,文档对象 | Object |
filename | 文件名 | String |
filePath | 媒体链接 | String |
mimeType | 文档格式类型 | String |
id | 媒体id | String |
sha256 | SHA256hash | String |
caption | 说明 | String |
location | type=location时,位置对象 | Object |
longitude | 经度 | String |
latitude | 维度 | String |
sticker | type=sticker时,贴图表情对象 | Object |
filePath | 媒体链接 | String |
mimeType | 贴图表情类型:image、webp | String |
animated | true-动画,false-其他 | Boolean |
id | 媒体id | String |
sha256 | SHA256hash | String |
unknown | Object | |
code | 错误码 | String |
details | 错误详情 | Object |
title | 标题 | String |
message | 错误信息 | String |
unsupported | Object | |
code | 错误码 | String |
details | 错误详情 | Object |
title | 标题 | String |
message | 错误信息 | String |
interactive | 交互式 | Object |
action | 功能 | Object |
buttons | 按钮 | Array |
reply | 按钮回复 | String |
id | 按钮id | String |
title | 按钮标题。它不能是空字符串,并且在消息中必须是唯一的(需测试)。20个字符 | String |
type | reply | String |
body | ||
text | 正文内容 | String |
footer | ||
text | 页脚内容 | String |
header | ||
text | 内容 | String |
type | 页眉的类型,interactive | String |
type | button | String |
contacts | 联系人对象 | Array |
addresses | 地址 | Array |
city | 城市 | String |
country | 国家 | String |
country_code | 国家码 | String |
state | 州 | String |
street | 街道 | String |
type | String | |
zip | String | |
birthday | 生日 | String |
emails | Array | |
邮箱 | String | |
type | 类型:HOME(家庭)、WORK(工作) | String |
name | Array | |
first_name | 全名 | String |
formatted_name | 名字 | String |
last_name | 姓氏 | String |
middle_name | 中间名 | String |
prefix | 名称后缀 | String |
suffix | 名称前缀 | String |
org | Object | |
company | 公司名称 | String |
department | 部门名称 | String |
title | 职务 | String |
phones | Array | |
phone | 手机号 | String |
department | 类型:HOME(家庭)、WORK(工作) | String |
urls | Array | |
type | 网址 | String |
url | 类型:HOME(家庭)、WORK(工作) | String |
context | 引用对象 | Object |
from | 商家号码 | String |
id | 商家下行消息id | String |
forwarded | 是否转发 | Boolean |
frequently_forwarded | 是否被转发超过5次 | Boolean |
referred_product | 引用产品对象 | Object |
catalog_id | 链接到 WhatsApp Business 帐户的 Meta 目录的唯一标识符 | String |
product_retailer_id | 产品唯一标识符 | String |
{
"appId": "TaPGlXbZ",
"businessPhone": "6395110022481",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "Amanda Wan",
"phone": "91856321412"
},
"message": {
"text": {
"body": "黄金时间"
},
"type": "text"
},
"messageId": "f4c567b283bb4c039bc600622864b961",
"timestamp": 1693396796
}
{
"appId": "TaPGlXbZ",
"businessPhone": "639518159038",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"image": {
"id": "1517236555680319",
"mimeType": "image/jpeg",
"filePath": "filePath",
"sha256": "OXVukVvsiD3tB+R5UXRqqMsLkocfLB1tLQyaqSsjwIE=",
"caption": "说明"
},
"type": "image"
},
"messageId": "0ed131197c6c490dbae8f682687a8bc8",
"timestamp": 1693397226
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"audio": {
"id": "id",
"mimeType": "mimeType",
"filePath": "filePath",
"sha256": "sha256"
},
"type": "audio"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"video": {
"id": "id",
"mimeType": "mimeType",
"filePath": "filePath",
"sha256": "sha256",
"caption": "说明",
"filename": "filename"
},
"type": "video"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"document": {
"id": "id",
"filePath": "filePath",
"filename": "filename",
"mimeType": "mimeType",
"sha256": "sha256",
"caption": "说明",
},
"type": "document"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "TaPGlXbZ",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"sticker": {
"id": "id",
"filePath": "filePath",
"mimeType": "mimeType",
"animated": true,
"sha256": "sha256"
},
"type": "sticker"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "TaPGlXbZ",
"businessPhone": "639518159038",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "Amanda Wan",
"phone": "91856321412"
},
"message": {
"location": {
"address": "吉华路999号坂田商业广场5楼, 深圳市, 广东 518129",
"latitude": "22.636734008789",
"longitude": "114.05695343018",
"name": "南国艺恒国际影城"
},
"type": "location"
},
"messageId": "c68f02e3308248d898dddaf7ab8508fb",
"timestamp": 1693466775
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message":{
"unknown":{
"code":"code",
"details":"details",
"title":"title",
"message":"message"
},
"type": "unknown"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"unsupported": {
"code": "code",
"details": "details",
"title": "title",
"message": "message"
},
"type": "unsupported"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"interactive": {
"action": {
"button": "按钮的文本内容 测试一下",
"sections": [{
"rows": [{
"description": "行的描述",
"id": "第一组001",
"title": "第一组你说呢?"
}],
"title": "节数组标题24个字符以内节数组标题24个"
}, {
"rows": [{
"description": "行的描述1333",
"id": "第一组001第一组666",
"title": "11111111111"
}],
"title": "节数组标题24个字符以内节数组标题24个字符"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个字符"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个1"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个字"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标题24个字"
}, {
"rows": [{
"description": "行的描述1",
"id": "第一组001",
"title": "11111"
}],
"title": "节数组标题24个字符以内节数组标"
}]
},
"body": {
"text": "正文的内容试试看,您的反馈确保我们不断改进。请点击此处分享您最近访问我们的地点的想法。asasas"
},
"footer": {
"text": "页脚的内容测试一下看看,正文的内容试试看,您的反馈确保我们不断改进。"
},
"header": {
"text": "页眉的内容试试看,您的反馈确保我们不断改进。请点击此处分享您最近访问我们的地点的想法。 ",
"type": "text"
},
"type": "list"
},
"type": "interactive"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "appId",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "sky",
"phone": "91856321412"
},
"message": {
"contacts": [{
"addresses": [{
"city": "城市名称",
"country": "完整的国家名称",
"country_code": "国家缩写",
"state": "州",
"street": "街道名称",
"type": "HOME",
"zip": "4800000"
}, {
"city": "城市名称2",
"country": "完整的国家名称2",
"country_code": "国家缩写2",
"state": "州2",
"street": "街道名称2",
"type": "WORK",
"zip": "4800000"
}],
"birthday": "2000-01-01",
"emails": [{
"email": "example@gmail.com",
"type": "WORK"
}, {
"email": "example2@gmail.com",
"type": "HOME"
}, {
"email": "example3@gmail.com",
"type": "HOME"
}],
"name": {
"first_name": "Aamnda",
"formatted_name": "全名mingcheng",
"last_name": "Yuesa",
"middle_name": "Ai",
"prefix": "名称前缀22",
"suffix": "名称后缀11"
},
"org": {
"company": "CompanyName",
"department": "DepartmentName",
"title": "TitleName"
},
"phones": [{
"phone": "91856321412",
"type": "IPHONE"
}, {
"phone": "91856321412",
"type": "CELL"
}, {
"phone": "91856321412",
"type": "MAIN"
}, {
"phone": "91856321412",
"type": "HOME"
}, {
"phone": "91856321412",
"type": "WORK"
}],
"urls": [{
"type": "WORK",
"url": "https://example.com/5197331628.html"
}, {
"type": "HOME",
"url": "https://www.example.com/"
}]
}],
"type": "contacts"
},
"messageId": "96f207149092495b8d0caaeeb3961266",
"businessPhone": "639518159038",
"timestamp": 1690869287
}
{
"appId": "W6C50ITl",
"businessPhone": "639481234567",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "name",
"phone": "8615503400098"
},
"message": {
"context": {
"from": "8615503400098",
"id": "936cfad865474c19a6bdbabef434aat6"
},
"text": {
"body": "Message content"
},
"type": "text"
},
"messageId": "57b9b152a2cf45c2b386330ec65f1erc",
"sendNum": 1,
"timestamp": 1707368748,
"wsCode": "chendalong"
}
{
"appId": "TaPGlXbZ",
"businessPhone": "6395110022481",
"channelType": 0,
"eventType": "up-message-event",
"from": {
"name": "Amanda Wan",
"phone": "8613530411151"
},
"message": {
"text": {
"body": "黄金时间"
},
"type": "text",
"context": {
"forwarded": "true",
"frequently_forwarded ":"true",
"from": "WABAID",
"id": "messege.ID",
"referred_product": {
"catalog_id": "CATALOG_ID",
"product_retailer_id": "PRODUCT_ID"
}
},
},
"messageId": "f4c567b283bb4c039bc600622864b961",
"timestamp": 1693396796
}