API: rcs/template - 模板刪除API
概覽
rcs/template
用于刪除5G消息模板。
URL
https://api-v4.mysubmail.com/rcs/template
接口響應(yīng)數(shù)據(jù)格式
格式 | URL |
---|---|
json | https://api-v4.mysubmail.com/rcs/template.json (默認(rèn)) |
xml | https://api-v4.mysubmail.com/rcs/template.xml |
yaml | https://api-v4.mysubmail.com/rcs/template.yaml |
一、創(chuàng)建模板
請(qǐng)求方式 | content-type設(shè)置 |
---|---|
delete | multipart/form-data 、x-www-form-urlencoded 、application/json |
請(qǐng)求參數(shù)
參數(shù) | 類型 | 必須/可選 | 默認(rèn) | 描述 |
---|---|---|---|---|
appid | string | 必須 | 無 | 在 SUBMAIL Chatbot中創(chuàng)建的5G消息應(yīng)用ID |
timestamp | int | 可選 | 無 | UNIX 時(shí)間戳,結(jié)果以秒為單位,使用加密鑒權(quán)方式,此參數(shù)必填 |
signType | enum | 可選 | normal | API 鑒權(quán)模式,可選參數(shù)normal 、sha256 |
signature | string | 必須 | 無 | 鑒權(quán)簽名 1. 當(dāng) signType 為sha256 時(shí),將以下參數(shù)拼接appid +appkey +appid=12345&signType=sha256& timestamp=1712122221 +appid +appkey “+”號(hào)為鏈接符號(hào),不參與拼接 用sha256將以上拼接字符串加密作為鑒權(quán)參數(shù) 當(dāng) signType 為normal 時(shí),appkey 即是signature 的值 |
templateID | string | 必須 | 無 | 模板ID |
請(qǐng)求示例
curl --location --request DELETE 'https://api-v4.mysubmail.com/rcs/template' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'appid=appid' \
--data-urlencode 'signature=appkey' \
--data-urlencode 'templateID=Xs4dvE'
成功返回
{
"status": "success",
}
失敗返回
{
"status":"error",
"code":"2xxx",
"msg":"錯(cuò)誤信息描述"
}