同一套代码,时而正常返回,时而报错签名错误AuthFailure.SignatureFailure

2021-11-08 17:56:31 浏览数 (1)

同一套代码,时而正常返回,时而返回签名错误AuthFailure.SignatureFailure

{

"Response": {

"Error": {

"Code": "AuthFailure.SignatureFailure",

"Message": "The provided credentials could not be validated. Please check your signature is correct."

},

"RequestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

}

对比发现,成功的签名里面没有特殊字符,失败的里面有 号等特殊字符

仔细阅读官网签名算法的文档,发现遗漏了urlencode环节,正常来说,get请求,最终参与拼串的字符串都是urlencode以后的,不应该有 号,有 号则说明遗漏了urlencode环节

V1算法:

V3算法:

0 人点赞