WhatsApp API getPreviewByFlowId - nxtele/http-api-document GitHub Wiki
根据流ID查询流预览地址
根据流ID查询流预览地址
- URL:
https://api2.nxcloud.com/v1/wa/m/flows/getPreviewByFlowId
- Method:
POST
- Content-Type:
application/json
- 需要鉴权:
是
鉴权机制
鉴权规则请参考地址:API接口调用约定
请求参数
header参数:
参数名 |
类型 |
必选 |
示例值 |
说明 |
accessKey |
String |
是 |
fmexxx3ki |
用户身份标识 |
ts |
String |
是 |
1655710885431 |
当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒 |
bizType |
String |
是 |
2 |
WhatsApp业务类型,取固定值“2” |
action |
String |
是 |
getPreviewByFlowId |
WhatsApp业务操作,取固定值“getPreviewByFlowId” |
sign |
String |
是 |
6e95xxx826 |
API入参参数签名,签名算法 |
body参数:
参数名 |
类型 |
必选 |
示例值 |
说明 |
appkey |
String |
是 |
|
牛信云WhatsApp应用的appkey |
flow_id |
String |
是 |
1743798696088965 |
流ID |
messaging_product |
String |
是 |
whatsapp |
发送消息的通道,应用于WhatsApp消息的发送时,值必须为“whatsapp” |
请求示例
body(application/json) 参数:
{
"flow_id": "1743798696088965",
"appkey": "jh42xxxd434",
"messaging_product": "whatsapp"
}
响应参数
参数名 |
类型 |
说明 |
code |
Integer |
结果编码 |
data |
JsonObject |
请求结果 |
message |
String |
请求结果说明 |
参数名 |
类型 |
说明 |
data |
resultInfo object |
响应数据 |
参数名 |
类型 |
说明 |
id |
string |
流的唯一ID |
preview |
previewInfo object |
预览信息 |
参数名 |
类型 |
说明 |
preview_url |
string |
预览视图的URL |
expires_at |
string |
URL过期时间 |
响应示例
成功示例
{
"code": 0,
"message": "Success",
"data": {
"preview": {
"preview_url": "https://business.facebook.com/wa/manage/flows/1743798696088965/preview/?token=5e816ae0-97de-46e4-bdd5-496d18f6aca9",
"expires_at": "2024-01-06T08:31:27+0000"
},
"id": "1743798696088965"
}
}
失败示例
{
"code": 400,
"message": "getFlowPreview Result error",
"data": {
"error": {
"message": "Unsupported get request. Object with ID '17437986960889653' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100.0,
"error_subcode": 33.0,
"fbtrace_id": "AX-f5ozd7JUmRLWAwX0wIOx"
}
},
"traceId": "a51099d5e1b34bb2aa78467cec18c6b2"
}
响应码说明
code |
message |
解决办法 |
0 |
请求成功 |
|
400 |
请求失败 |
请联系技术人员排除问题 |