短信服务使用方可以调用BindTrafficDrivingParamsSDK接口在二级模版上绑定引流变量,生成三级模板。
POSThttps://sms.volcengineapi.com/?Action=BindTrafficDrivingParamsSDK&Version=2021-01-11名称 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | BindTrafficDrivingParamsSDK | 要执行的操作,取值:BindTrafficDrivingParamsSDK |
Version | String | 是 | 2021-01-11 | API的版本,取值:2021-01-11 |
名称 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
subAccounts | Array of String | 否 | ["2dhwher","2dhw234"] | 消息组ID集合,如果区分特定的消息组,需要填写,数组为空时针对全局创建 |
secondTemplateId | String | 否 | S2T_1234avd | 需要关联引流信息的二级模板ID |
templateTrafficDriving | Array of Objects | 是 | 模板中的参数的引流信息内容,是一个二维数组,具体参考json的case |
名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
ResponseMetadata | ResponseMetadata | 响应公共参数。 | |
Result | String | 响应业务参数。 |
{ "subAccounts":["6df8****"], "secondTemplateId":"S1T_xxxx", "templateTrafficDriving":[ [ { "name":"phone", "paramType":3, "content":"188*******" }, { "name":"url", "paramType":2, "content":"douyin.com" } ], [ { "name":"phone", "paramType":3, "content":"188*******" }, { "name":"url", "paramType":2, "content":"douyin.com/123" } ] ] }
{ "ResponseMetadata":{ "RequestId":"2022090818181501017423503804EC****", "Action":"BindTrafficDrivingParamsSDK", "Version":"2021-01-11", "Service":"volcSMS", "Region":"cn-north-1" }, "Result":"" }
{ "subAccounts":["6df8****"], "secondTemplateId":"S1T_xxxx", "templateTrafficDriving":[ [ { "name":"phone", "paramType":3, "content":"188*******" }, { "name":"url", "paramType":2, "content":"douyin.com" } ], [ { "name":"phone", "paramType":3, "content":"188*******" }, { "name":"url", "paramType":2, "content":"douyin.com/123" } ] ] }
{ "ResponseMetadata": { "RequestId":"2022090818181501017423503804EC****", "Action":"BindTrafficDrivingParamsSDK", "Version":"2021-01-11", "Service":"volcSMS", "Region":"cn-north-1" "Error": { "Code": "1001", "Message": "请求参数错误" } } }
下表提供了该接口业务逻辑相关的错误码。公共错误码请参见公共错误码。
HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
200 | 1001 | 参数错误 | 参数错误 |
200 | 1999 | 系统错误 | 系统错误 |
200 | 1007 | template check failed | 模板申请时,校验失败 |