Closed MaximeMarcaisBoxtal closed 2 years ago
@MaximeMarcaisBoxtal I have the same problem, have you solved it now?
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.
Hi,
I have built the JAVA library as described in Generating a Java SDK with LWA token exchange and authentication, and added the dependencies to my project. My app is Published and "hybrid".
I try to Get an LWA authorization code from MWS credentials from the generated AuthorizationApi, but I get the following response:
{ "errors": [ { "message": "Access to requested resource is denied.", "code": "Unauthorized", "details": "" } ] }
Request:
Request{method=GET, url=https://sellingpartnerapi-eu.amazon.com/authorization/v1/authorizationCode?sellingPartnerId=XXXXXXXXXXXXXX&developerId=XXXXXXXXXXXX&mwsAuthToken=amzn.mws.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, tag=Request{method=GET, url=https://sellingpartnerapi-eu.amazon.com/authorization/v1/authorizationCode?sellingPartnerId=XXXXXXXXXXXXXX&developerId=XXXXXXXXXXXX&mwsAuthToken=mzn.mws.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, tag=null}}
Generated headers:
Accept: application/json Content-Type: application/json User-Agent: Swagger-Codegen/1.0.0/java x-amz-access-token: Atc|MQEB... X-Amz-Security-Token: FwoGZXIv... Host: sellingpartnerapi-eu.amazon.com X-Amz-Date: 20210715T134204Z Authorization: AWS4-HMAC-SHA256 Credential=XXXXXXXXXXXXXXXXXXXX/20210715/eu-west-1/execute-api/aws4_request, SignedHeaders=accept;content-type;host;user-agent;x-amz-access-token;x-amz-date;x-amz-security-token, Signature=8f81bbf9...
Am I missing something? Thanks for your help!
Best regards,