0

截至今天(2021.12),我正在尝试从亚马逊获取受限数据令牌(RDT)。我的应用程序成功地从某些 Selling Partner API(如 Orders API)获取数据/orders/v0/orders,现在我尝试使用相同的代码从 Token API 获取 RDT /tokens/2021-03-01/restrictedDataToken。我只需要更改此 URL 并将受限资源正文添加到我的请求中,我的理解是其他一切都保持不变。至少在https://github.com/amzn/sales-partner-api-docs/issues/639中描述了这种情况:

获取 RDT 令牌的请求类似于向请求添加 LWA 访问令牌的普通 SP API 请求。以下是将 RDT 令牌用于受限 API 的总结工作流程 -

1. Generate LWA Access token

2. Make a request to Tokens API signed with the LWA token (the way a normal SP API request is constructed). 
   Add the restricted API path and method as part of the request body parameters.

3. The response should give you the RDT token. 
   You then use this RDT token instead of LWA Access Token in your Restricted API operation.

但是,当我的 Order API 调用成功时,Token API 调用返回神秘:

The request signature we calculated does not match the signature you provided. 
Check your AWS Secret Access Key and signing method.

此错误消息是否可能具有误导性,我是否应该联系亚马逊以获得我的应用程序(LWS 密钥)或我的用户(AWS 密钥)的额外权限?如何进一步调试/跟踪所有内容都隐藏在亚马逊服务器中的情况?

4

0 回答 0