а√在线中文网新版地址在线,播五月开心婷婷综合,午夜国产精品视频在线,√8天堂资源地址中文在线,80岁色老头oldmanvideos

注冊(cè)送短信

API: rcs/media - 創(chuàng)建素材


概覽


rcs/upload 是 SUBMAIL 5G消息的素材創(chuàng)建 API。



URL


https://api-v4.mysubmail.com/rcs/media


接口響應(yīng)數(shù)據(jù)格式


格式URL
jsonhttps://api-v4.mysubmail.com/rcs/media.json(默認(rèn))
xmlhttps://api-v4.mysubmail.com/rcs/media.xml
yamlhttps://api-v4.mysubmail.com/rcs/media.yaml


http 請(qǐng)求方式


請(qǐng)求方式content-type設(shè)置
postmultipart/form-data




請(qǐng)求參數(shù)


參數(shù)類型必需/可選默認(rèn)描述
appidstring必須無(wú)在 SUBMAIL Chatbot中創(chuàng)建的5G消息應(yīng)用ID
filefile必須無(wú)素材文件 素材大小建議控制在2M內(nèi)
timestampint可選無(wú)UNIX 時(shí)間戳,結(jié)果以秒為單位,使用加密鑒權(quán)方式,此參數(shù)必填
signTypestring可選normalAPI 鑒權(quán)模式,可選參數(shù)normal、sha256
signaturestring必須無(wú)鑒權(quán)簽名
1. 當(dāng)signTypesha256時(shí),將以下參數(shù)拼接
appid+appkey+appid=?&signType=sha256& timestamp=1712122221+appid+appkey
“+”號(hào)為鏈接符號(hào),不參與拼接
用sha256將以上拼接字符串加密作為鑒權(quán)參數(shù)
當(dāng)signTypenormal時(shí),appkey即是signature的值


請(qǐng)求示例


POST /rcs/media HTTP/1.1
Host: api-v4.mysubmail.com
Content-Length: 370
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="appid"

appid
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="signature"

signature
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="123.png"
Content-Type: image/png

(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--


成功返回
{
  "status": "success",
  "id": "ikJvMC", //素材ID
}


失敗返回
{
  "status":"error",
  "code":"2xxx",
  "msg":"錯(cuò)誤信息描述"
}