短信服务使用方可以调用BindSignaturesSDK接口为一级模板绑定签名,如果模板中有引流变量,此接口也可以绑定引流变量。
POSThttps://sms.volcengineapi.com/?Action=BindSignaturesSDK&Version=2021-01-11名称 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | BindSignaturesSDK | 要执行的操作,取值:BindSignaturesSDK |
Version | String | 是 | 2021-01-11 | API的版本,取值:2021-01-11 |
名称 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
subAccounts | Array of String | 否 | ["2dhwher","2dhw234"] | 消息组ID集合,如果区分特定的消息组,需要填写,数组为空时针对全局创建 |
templateId | String | 是 | S1T_xxxx | 申请模板时返回的Id信息 |
signatures | Array of String | 是 | ["签名1","签名2"] | 关联的签名列表 |
templateTrafficDriving | Array of Objects | 否 | 模板中的参数的引流信息内容,是一个二维数组,具体参考json的case |
名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
ResponseMetadata | ResponseMetadata | 响应公共参数。 | |
Result | BindSignaturesResp | 响应业务参数。 |
{ "subAccounts":["6df8****"], "templateId":"S1T_xxxx", "signatures":["签名1","签名2"], "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":"BindSignatures", "Version":"2021-01-11", "Service":"volcSMS", "Region":"cn-north-1" }, "Result": { "templateId": "S1T_1y2p*****", "secondTemplates": [ { "secondTemplateId": "S2T_1y2t*****", "signature": "爱看", "industry": "finance", "industryCn": "金融", "channelType": "CN_MKT", "content": "【爱看】测试营销短信,${phone1}, ${url}拒收请回复R" }, { "secondTemplateId": "S2T_1y2p******", "signature": "爱看", "industry": "educate", "industryCn": "教育", "channelType": "CN_MKT", "content": "【爱看】测试营销短信,${phone1}, ${url}拒收请回复R" } ] } }
{ "subAccounts":["6df8****"], "templateId":"S1T_xxxx", "signatures":["签名1","签名2"], "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":"BindSignatures", "Version":"2021-01-11", "Service":"volcSMS", "Region":"cn-north-1" "Error": { "Code": "1001", "Message": "请求参数错误" } } }
下表提供了该接口业务逻辑相关的错误码。公共错误码请参见公共错误码。
HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
200 | 1001 | 参数错误 | 参数错误 |
200 | 1999 | 系统错误 | 系统错误 |
200 | 1007 | template check failed | 模板申请时,校验失败 |