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
611 stars 733 forks source link

GetAuthorizationCode returning 400 Bad Request #29

Closed gasper-vrhovsek closed 3 years ago

gasper-vrhovsek commented 3 years ago

Hi. I am developing a java application as a POC for using this API by a customer.

I have built the JAVA library as described in Generating a Java SDK with LWA token exchange and authentication, added them as maven dependencies in my pom.xml and build the app.

I have successfully called the GetMarketplaceParticipations method in the SellersApi and got relevant results. The problem starts when trying to authenticate other sellers through the AuthorizationApi.getAuthorizationCodeAsync. We have customers who have already authorised us through the MWS api and we can't authorize them through the Selleing-partner-api. The API always returns:

{
  "errors": [
    {
      "code": "InvalidInput",
      "message": "Developer ID 35XXXXXXXXXX is not associated with the application id.",
      "details": ""
    }
  ]
}

Me and some guys from the rest of the team have double and triple checked, this developer id is entered for the correct region in sellercentral.amazon.com > Apps & Service > Develop Apps.

I am calling this as a grantless operation, without the refresh token and with the "sellingpartnerapi::migration" scope. Are we perhaps forgetting any policies for this? I only added roles and policies from the Selling Partner API Developer Guide

I am not sure, if this is the correct github repo for this report, but hopefully i can get some suggestions on how to deal with this issue and what we are perhaps doing wrong.

gasper-vrhovsek commented 3 years ago

Closed because it's a duplicate of https://github.com/amzn/selling-partner-api-models/issues/798