Skip to content

WhatsApp API updateFlowJson

Jcateye edited this page Apr 15, 2024 · 5 revisions

更新流JSON

要更新指定流的流 JSON,请注意,该文件必须作为表单数据附加。

  • URL:/v1/wa/m/flows/updateFlowJson
  • Method:POST
  • Content-Type:multipart/form-data
  • 需要鉴权:(备注:此接口的签名算法为hex(md5(headersStr + accessSecretStr)),计算签名时无需拼接body参数)

鉴权机制

鉴权规则请参考地址:API接口调用约定

请求参数

header参数:

参数名 类型 必选 示例值 说明
accessKey String fme2na3kdi3ki 用户身份标识
ts String 1655710885431 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒
bizType String 2 WhatsApp业务类型,取固定值“2”
action String updateFlowJson WhatsApp业务操作,取固定值“updateFlowJson”
sign String 6e9506557d1f289501d333ee2c365826 API入参参数签名,签名算法

body参数:

参数名 类型 必选 示例值 说明
flow_id String 387345730623799 流ID
messaging_product String whatsapp 发送消息的通道,应用于WhatsApp消息的发送时,值必须为“whatsapp”
file file - json文件

请求示例

body(multipart/form-data) 参数:

messaging_product = whatsapp
flow_id= 387345730623799
file = 

响应参数

参数名 类型 说明
code Integer 结果编码
data JsonObject 请求结果
message String 请求结果说明
  • data object参数:
参数名 类型 说明
success boolean 更新操作成功或失败
validation_errors array[object] 流程中的错误列表,在发布流程之前必须修复所有错误

响应示例

成功示例

{
  "code": 0,
  "message": "Success",
  "data": {
    "success": true,
    "validation_errors": []
  }
}

失败示例

{
  "code": 400,
  "message": "updateFlowJsonByFlowId error",
  "data": {
    "error": {
      "message": "Updating attempt failed",
      "type": "OAuthException",
      "code": 139001.0,
      "error_subcode": 4016010.0,
      "is_transient": false,
      "error_user_title": "Flow can't be updated",
      "error_user_msg": "Flow can only be modified in Draft status",
      "fbtrace_id": "A361amdy-RWNN3LqcsqzTyi"
    }
  },
  "traceId": "dd5bef3482a042f5b8338a76df789b31"
}

响应码说明

code message 解决办法
0 请求成功
400 请求失败 请联系技术人员排除问题
1000~100X 鉴权问题 详情查看API鉴权部分

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally