帮忙看看视觉智能平台这个错误:
{
“code”:”SignatureDoesNotMatch”,
“message”:”code: 400, Specified signature does not match our calculation. server StringToSign is [ACS3-HMAC-SHA256
2238bf1072e25257e4e604ee03ba39e0d40126704ac4ceba3809da11db971369], server CanonicalRequest is [POST
/
content-type:application/x-www-form-urlencoded
host:facebody.cn-shanghai.aliyuncs.com
x-acs-action:CompareFace
x-acs-content-sha256:bdbc7789d553b624668d48c1b4a07dd09ad3c4763576fe99c9f19182f86750ff
x-acs-date:2023-10-12T13:07:46Z
x-acs-signature-nonce:700427ac3cece8cf1420aa7bc554e5ac
x-acs-version:2019-12-30
content-type;host;x-acs-action;x-acs-content-sha256;x-acs-date;x-acs-signature-nonce;x-acs-version
bdbc7789d553b624668d48c1b4a07dd09ad3c4763576fe99c9f19182f86750ff] request id: C9EF4437-53DA-5729-9525-0E1A43C9F57A”,
“data”:{
“RequestId”:”C9EF4437-53DA-5729-9525-0E1A43C9F57A”,
“Message”:”Specified signature does not match our calculation. server StringToSign is [ACS3-HMAC-SHA256
2238bf1072e25257e4e604ee03ba39e0d40126704ac4ceba3809da11db971369], server CanonicalRequest is [POST
/
content-type:application/x-www-form-urlencoded
host:facebody.cn-shanghai.aliyuncs.com
x-acs-action:CompareFace
x-acs-content-sha256:bdbc7789d553b624668d48c1b4a07dd09ad3c4763576fe99c9f19182f86750ff
x-acs-date:2023-10-12T13:07:46Z
x-acs-signature-nonce:700427ac3cece8cf1420aa7bc554e5ac
x-acs-version:2019-12-30
content-type;host;x-acs-action;x-acs-content-sha256;x-acs-date;x-acs-signature-nonce;x-acs-version
bdbc7789d553b624668d48c1b4a07dd09ad3c4763576fe99c9f19182f86750ff]”,
“Recommend”:”https://api.aliyun.com/troubleshoot?q=SignatureDoesNotMatch&product=facebody&requestId=C9EF4437-53DA-5729-9525-0E1A43C9F57A”,
“HostId”:”facebody.cn-shanghai.aliyuncs.com”,
“Code”:”SignatureDoesNotMatch”,
“statusCode”:400
},
“statusCode”:400,
“stackTrace”:[
],
"suppressedExceptions":[
]
}
在测试环境都是正常的。上生产环境就返回这个错误。
您好,根据您的错误信息SignatureDoesNotMatch来看应是您在生产环境调用时签名错误
请求签名的生成可以参考文档:请求签名如果您的签名生成代码是参考文档并且测试环境没有问题的话,建议您检查一下AccessKeyID和AccessKeySecret是否输入的不对。
这个错误是由于签名错误导致的,可能是由于以下原因:
根据错误信息,该问题可能是由于签名错误导致的。您需要检查您的签名算法是否正确,并确保您的签名字符串与服务器生成的签名字符串匹配。https://help.aliyun.com/zh/viapi/developer-reference/common-error-code-6?spm=a2c4g.11186623.0.i6
此外,您还可以尝试在您的代码中添加日志记录,以便更好地了解问题的原因。