开发者社区> 问答> 正文

帮忙看下阿里云OpenAPI swift sdk 为什么会报签名不匹配?

帮忙看下阿里云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)

展开
收起
真的很搞笑 2024-04-29 15:03:31 67 0
1 条回答
写回答
取消 提交回答
  • 北京阿里云ACE会长

    检查您的Swift SDK是否使用了与阿里云OpenAPI相同的签名算法。在您提供的错误信息中,签名算法是ACS3-HMAC-SHA256,确保您的SDK也使用了这个算法。

    2024-04-30 08:34:46
    赞同 2 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
跨平台的云服务SDK需要什么 立即下载
一个跨平台的云服务SDK需要什么 立即下载
最大化阿里云OpenAPI能力的方法和实践 立即下载