帮忙看下阿里云OpenAPI swift sdk 为什么会报签名不匹配?
SignatureDoesNotMatch
code: 400, Optional(Specified signature does not match our calculation. server StringToSign is [ACS3-HMAC-SHA256
4d6bad797c45069e63a8acb37ba975dc476690b06c2dd196eba9376639657e16], server CanonicalRequest is [POST
/
Type=Advanced&Url=https%3A%2F%2Fimage.baidu.com%2Fsearch%2Fdown%3Ftn%3Ddownload%26ipn%3Ddwnl%26word%3Ddownload%26ie%3Dutf8%26fr%3Dresult%26url%3Dhttp%253A%252F%252Fimages.china.cn%252Fnews%252Fattachement%252Fjpg%252Fsite3%252F20120222%252F5958692060524490867.jpg%26thumburl%3Dhttps%253A%252F%252Fimg1.baidu.com%252Fit%252Fu%253D3265448258%252C2354628091%2526fm%253D253%2526fmt%253Dauto%2526app%253D138%2526f%253DJPEG%253Fw%253D426%2526h%253D269
content-type:application/octet-stream
host:ocr-api.cn-hangzhou.aliyuncs.com
x-acs-action:RecognizeAllText
x-acs-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-acs-date:2024-04-25T06:47:19Z
x-acs-signature-nonce:51a1050b4239a1375fd2d4fd46b04e27
x-acs-version:2021-07-07
content-type;host;x-acs-action;x-acs-content-sha256;x-acs-date;x-acs-signature-nonce;x-acs-version
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]) request id: Optional(11352438-2912-5A32-9177-A987805EBB62)
检查您的Swift SDK是否使用了与阿里云OpenAPI相同的签名算法。在您提供的错误信息中,签名算法是ACS3-HMAC-SHA256,确保您的SDK也使用了这个算法。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。