亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

騰訊云“人臉靜態活體檢測”api怎么請求?

騰訊云“人臉靜態活體檢測”api怎么請求?

###########鑒權代碼#######################鑒權簽名 appid='' bucket?=?'' SecretID?=?'' secret_key?=?'' expiredTime?=?time.time()+2592000 currentTime?=?time.time() rand?=?round(random.random()*(10**8)) userid?=?"0" #資源存儲的唯一標識,單次簽名必填;多次簽名選填,如填寫則會驗證與當前操作的文件路徑是否一致。 fileid?=?'xuehua.jpg' req?=?"a=[{appid}]&b=[{bucket}]&k=[{SecretID}]&e=[{expiredTime}]&t=[{currentTime}]&r=[{rand}]&u=[{userid}]&f=[{fileid}]".format(appid=appid,bucket=bucket,SecretID=SecretID,expiredTime=expiredTime,currentTime=currentTime,rand=rand,userid=userid,fileid=fileid) req?=?bytes(req,'utf8') secret_key?=?bytes(secret_key,'utf8') sha?=?hmac.new(secret_key,req,digestmod=hashlib.sha1) encrypts?=?sha.digest() print(encrypts) sign?=?base64.b64encode(encrypts) print(sign)結果####################請求靜態活體檢測api########################url_livedetectpicture?=?'http://service.image.myqcloud.com/face/livedetectpicture' header?=?{'Authorization':sign,"content-type":"application/json"} data?=?{'appid':appid,"sign":'123456',"url":"http://compuspro-*********.coscd.myqcloud.com/advertising/2017/12/07/bear_three.png"} r?=?requests.post(url_livedetectpicture,data?=?data,params=header) print(r.text)結果{"code":3,"message":"invalid?request:?parsing?error?-?check?content-type?and?body","data":{}}網上資料也不多,希望能請教到大神或有經驗的朋友,這個請求該怎么改
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關注
  • 2179 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號