-
Notifications
You must be signed in to change notification settings - Fork 6
Messenger API mt
zjc1750514326 edited this page Jan 15, 2025
·
3 revisions
通过API发起Messenger消息发送服务
- URL:
https://api.nxcloud.com/v1/messenger/mt
- Method:
POST
- Content-Type:
application/json
- 需要鉴权:
是
鉴权规则请参考地址:API接口调用约定
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
pageId | String | 是 | 公共主页id |
recipientId | String | 是 | 接收方id |
functionType | String | 是 | 消息类型 |
messageData | Object | 是 | 消息体参数 |
appkey | String | 是 | 应用唯一标识 |
类型 | 描述 | 必填参数 |
---|---|---|
text | 文本 | messageData{rateType=Message,text不能为空} |
image | 图片 | messageData{rateType=Message,image不能为空} |
audio | 音频 | messageData{rateType=Message,url不能为空} |
video | 视频 | messageData{rateType=Message,url不能为空} |
template | 普通模板 | messageData{rateType=Message,title不能为空} |
button_template | 按钮模板 | messageData{rateType=Message,text/elements不能为空} |
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
rateType | String | 是 | 计费类型(Message) |
text | String | 否 | 文本内容 |
url | String | 否 | 地址(根据functionType确定是图片/音频/视频地址) |
type | String | 否 | 类型(当functionType为template特有,generic/button) |
elements | Array | 否 | 元素数组 |
类型 | 描述 |
---|---|
Message | 消息 |
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
title | String | 否 | 标题(type=generic时必填) |
subtile | String | 否 | 子标题 |
imageUrl | String | 否 | 图片地址 |
buttons | Array | 是 | 按钮数组(type=button时必填) |
参数名 | 类型 | 必填 | 描述 |
---|---|---|---|
type | String | 是 | 类型(web_url/postback) |
url | String | 是 | 跳转地址 |
title | String | 是 | button名称 |
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "text",
"messageData": {
"text": "Hello World!",
"rateType": "Promotional"
}
}
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "image",
"messageData": {
"url": "your_url",
"rateType": "Message"
}
}
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "audio",
"messageData": {
"url": "your_audio_url",
"rateType": "Message"
}
}
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "video",
"messageData": {
"url": "your_video_url",
"rateType": "Message"
}
}
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "template",
"messageData": {
"elements": [
{
"title": "Welcome!",
"image_url": "https://example.com/image.jpg",
"subtitle": "We have the right hat for everyone.",
"action": {
"type": "web_url",
"url": "https://www.example.com"
},
"buttons": [
{
"type": "web_url",
"url": "https://www.example.com",
"title": "View Website"
}
]
}
],
"type": "generic",
"rateType": "Message"
}
}
{
"appkey": "your_app_key",
"pageId": "your_page_id",
"recipientId": "recipient_id",
"functionType": "button_template",
"messageData": {
"text": "button template",
"elements": [
{
"buttons": [
{
"type": "web_url",
"url": "https://www.example.com",
"title": "访问网站"
},
{
"type": "postback",
"payload": "POSTBACK_PAYLOAD",
"title": "回调按钮"
}
]
}
],
"type": "button",
"rateType": "Message"
}
}
参数名 | 类型 | 描述 |
---|---|---|
code | Integer | 响应码 |
message | String | 响应描述 |
data | Object | 响应数据 |
traceId | Object | 链路追踪id |
{
"code": 0,
"message": "Success",
"data": {
"requestId": "metamid.xxxx"
},
"traceId": "xxxx"
}
错误码 | 描述 |
---|---|
0 | 成功 |
9000 | 参数错误 |
简介
短信
语音
- 上传语音录音文件
- 上传语音录音文件_v1
- 已上传录音文件查询
- 发送语音群呼
- 发送语音通知
- 发送语音验证码
- 语音验证码回填上报
- 语音回执回调
- 语音记录查询
- 上传语音录音文件-旧版本已废弃
- 发送语音群呼‐旧版已废弃
- 发送语音通知‐旧版已废弃
- 发送语音验证码‐旧版已废弃
- 语音回执回调‐旧版已废弃
云呼叫中心(NXLink)
- Web SDK
- Iframe集成
- 手动拨号通话记录查询
- 通过orderId查询
- 手动拨号记录回调
- 坐席信息查询
- 坐席状态查询
- 坐席状态信息查询
- 坐席组查询
- 坐席可用主叫查询
- 坐席组成员查询
- 坐席组更新成员
- 坐席效率统计
- 创建AICC外呼任务
- Webhook-手动外呼
云呼叫中心(AI自动外呼)
- Callbot API概述
- Callbot API鉴权
- Callbot 接口探活
- 创建自动拨号任务
- 批量添加拨打名单
- 创建自动拨号任务并添加拨打名单
- 任务控制(启动/暂停)
- 更新任务
- 获取通话列表
- 获取任务列表
- 获取拨打订单列表
- 停止订单拨打
- 查询订单维度拨打详情
- 通话维度回调
- 订单维度拨打回调
- 任务状态回调
- 批次-导出最新批次数据
- 批次-导入最新批次数据
Flash Call
短链
邮件验证码
DID号码
- DID号码进行短信下行V2
- DID短信结果回调(加签)
- DID短信结果回调(无加签)
- DID号码短信记录查询(新接口,未启用)
- DID号码通话记录查询
- DID呼出并转接到Amazon坐席
- DID呼出前与Connect号码绑定
通用
号码检测
- 发送消息
- 发送otp消息
- webhook
- 标记入站消息已读
- 上传媒体文件
- 获取媒体文件
- 删除媒体文件
- 查询号码信息
- 查询消息模板
- 创建消息模板
- 异步创建消息模板
- 编辑消息模板
- 删除消息模板
- 上传模板示例文件
- 嵌入式页面登录
- 创建客户应用
- 客户应用的号码列表
- 获取验证码
- 核验验证码
- flows-创建流
- flows-更新流
- flows-根据流ID查询流信息
- flows-根据whatsapp号码查询流列表
- flows-根据流ID查询流预览地址
- flows-查询流JSON
- flows-发布流
- flows-删除流草稿
- flows-废弃已发布的流
- flows-更新流JSON
- flows-上传业务公钥
- ads-根据公共主页ID查询绑定的数据集列表
- ads-根据数据集ID上报CAPI广告数据
Viber
Zalo ZNS
Super Message API
隐私号(旧)
PNS
坐席(旧版)
- NXphone PC 使用说明
- NXphone Android 使用说明
- NXphone Android SDK 接入文档
- 呼叫挂断原因解释
- 话单CDR查询接口
- 话单CDR回调接口说明(V1.0)
- 坐席API调用接口说明(V1.0)
- 根据orderid查询话单CDR接口
- 坐席系统sip链接调用方式(推荐)
- 号码脱敏处理
- 修改话机密码接口
- 查询审批单
- 查询话机
- WebRTC SDK使用说明
AI Agent