开发者社区> 问答> 正文

阿里云OpenAPI发送的请求有的时候能通过,有的时候不行?

请问为什么我发送的阿里云OpenAPI请求有的时候能通过,有的时候会返回Specified signature is not matched with our calculation. server string to sign is
返回的信息中要求签名的字符串与我实际签名的字符串分别是:
POST&%2F&AccessKeyId%3D我的AccessKeyID%26Action%3DSendSms%26Format%3DJSON%26PhoneNumbers%3D13576931913%26SignName%3D%25E9%2598%25BF%25E9%2587%258C%25E4%25BA%2591%25E7%259F%25AD%25E4%25BF%25A1%25E6%25B5%258B%25E8%25AF%2595%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D7196eaae-1f6b-42d6-b83e-3198a407f98d%26SignatureVersion%3D1.0%26TemplateCode%3DSMS_154950909%26TemplateParam%3D%257B%2522code%2522%253A%2522227373%2522%257D%26Timestamp%3D2024-02-23T06%253A38%253A59Z%26Version%3D2017-05-25

POST&%2F&AccessKeyId%3D我的AccessKeyID%26Action%3DSendSms%26Format%3DJSON%26PhoneNumbers%3D13576931913%26SignName%3D%25E9%2598%25BF%25E9%2587%258C%25E4%25BA%2591%25E7%259F%25AD%25E4%25BF%25A1%25E6%25B5%258B%25E8%25AF%2595%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D7196eaae-1f6b-42d6-b83e-3198a407f98d%26SignatureVersion%3D1.0%26TemplateCode%3DSMS_154950909%26TemplateParam%3D%257B%2522code%2522%253A%2522227373%2522%257D%26Timestamp%3D2024-02-23T06%253A38%253A59Z%26Version%3D2017-05-25

展开
收起
你鞋带开了~ 2024-02-28 20:05:58 48 0
1 条回答
写回答
取消 提交回答
  • 应该是SK写错了,stringtosign完了 就是stringtosign和SK制作签名了 你检查下这块逻辑就好
    --此回答整理自钉群“阿里云 OpenAPI SDK 自签名服务群”

    2024-02-28 20:11:06
    赞同 1 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
AutoTalk第七期:自动化工具-OpenAPI在线调试 立即下载
最大化阿里云OpenAPI能力的方法和实践 立即下载
低代码开发师(初级)实战教程 立即下载