SP-API Authorization - Developer ID not associated with application id


#1

Hi all!

I am currently in the process of developing a proof of concept application using the new Selling Partner API. We already have a MWS application up and running and we’re also authorised by a number of other sellers through the MWS authorisation flow.

I have set up my project following the Selling Partner API Developer Guide: https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md#selling-partner-api-developer-guide

I’m using the generated Java SDK. I am having success with both grant and grantees operations, namely:

  • SellersApi.getMarketplaceParticipationsAsync
  • NotificationsApi.getDestinationsAsync

They all return expected results and work as intended.

I am having issues using the provided AuthorizationApi (utilizing the LWA). Each time I want to authorize an 3rd party seller with his/hers MWS credentials (selling partner ID, mms token and our own developerId) I get the following response:

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

We have checked the application registration form, it has the SP API and MWS selected under the API type, it has all the Roles enabled and has the correct IAM ARN of the role with sts:AssumeRole action (shown below). That role has a managed policy attached with the following JSON:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "execute-api:Invoke",
            "Resource": "arn:aws:execute-api:*:*:*"
        }
    ]
}

I also created an IAM user with an inline policy to assume the role above:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "sts:AssumeRole",
            "Resource": "arn:aws:iam::XXXXXXXXXXXX:role/SellingPartnerAPIRole"
        }
    ]
}

What are we doing wrong? Is there an issue with our app configuration?


#2

Hey guy, same issue, did you solve the problem yet?


#3

Hey guy, same issue, did you solve the problem yet?


#4

This returns a 404 https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md#selling-partner-api-developer-guide