question

GasperV avatar image
GasperV asked

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

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?

apilogin with amazonappseller central
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Mike@Amazon avatar image
Mike@Amazon answered

Hi Gasper,

This forum is for Amazon Developers.

For questions about Marketplace Web Services, I'd recommend you ask at the Amazon Services Seller Forums instead.

You can also contact MWS Support.

Thanks,

Mike

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GasperV avatar image GasperV commented ·

Hi Mike,


Thanks for the pointers, i'll ask there.


Best regards,

Gasper

-1 Like -1 ·