amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
609 stars 732 forks source link

It can be requested normally without NextToken, and the request with NextToken will return prompt "code": "InvalidSignature" #881

Closed 530413 closed 3 years ago

530413 commented 3 years ago

When I pull the order, the data can be returned normally without NextToken, but when NextToken returns "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details", I’m curious, when I try to use a string of abnormal NextToken strings instead of NextToken to send a request, it returns "We could not decode your NextToken. Possible reasons include: a transmission error, improper quoting or a truncation problem.

So I will send the parameter value to URLEncode processing, the result is also returned "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details", how should I set Request parameter NextToken to return NextToken data.

public static String escapeString(String str) { try { return URLEncoder.encode(str, "utf8").replaceAll("\+", "%20"); } catch (UnsupportedEncodingException e) { return str; } }

x-amzn-RequestId=[6ae0da16-27e3-492f-a2ed-16768e3a6071] Can you help me check this request through RequestId? The system returns "message": "We could not decode your NextToken. Possible reasons include: a transmission error, improper quoting or a truncation problem.", I have tried a lot of requests that have not been processed correctly for NextToken. I hope you can tell me the How to deal with NextToken parameters

ShivikaK commented 3 years ago

Hello @530413

We will need to work with you via a support case to resolve this issue. Please open a support case so we can pursue the investigation.

Thanks, 
Shivika Khare
 Selling Partner API Developer Support