我已经完全按照官方开发者指南 ( https://github.com/amzn/ sell -partner-api-docs ) 进行操作,并且能够获得访问权和刷新令牌。我还设法使用 SHA256 散列算法正确签署每个请求。但是在尝试进行 API 调用之后,这是我得到的错误。
{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": ""
}
]
}
附加到 IAM 角色的内联策略是:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::310069193681:role/SellingPartner"
}
]
}
下面附上其他请求细节......
{
'Date': 'Mon, 12 Jul 2021 10:23:12 GMT',
'Content-Type': 'application/json',
'Content-Length': '141',
'Connection': 'keep-alive',
'x-amzn-RequestId': '8541dac4-e734-486b-820d-3010f447b055',
'x-amzn-ErrorType': 'AccessDeniedException',
'x-amz-apigw-id': 'CWiykGXFDoEF2Xw='
}