请问为什么我发送的阿里云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
应该是SK写错了,stringtosign完了 就是stringtosign和SK制作签名了 你检查下这块逻辑就好
--此回答整理自钉群“阿里云 OpenAPI SDK 自签名服务群”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。