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

[BUG] [SP-API] [Issue] Authorize application in a customer #2691

Closed jjmg1945 closed 1 year ago

jjmg1945 commented 1 year ago

Hello,

We had a private application with MWS API since several years, running in an external customer. When we put the application in production, customer could authorize us from his seller central panel => Authorize new developer option, although the application was privated.

With the new SP-API we didn't find the procedure to authorize our private application in this external customer. We already readed all SP-API documentation.

The only solution that we found was updating our developer profile to public and use the website authorization workflow.

I have two questions:

  1. Is there any possibility to use our private SP-API application in an external customer as the MWS API application?
  2. If not, is the procedure mentioned the correct procedure?

Thanks, regards

leonardonakagawa commented 1 year ago

Hi @jjmg1945,

The authorization model for the Selling Partner API is based on Login with Amazon, Amazon's implementation of OAuth 2.0. In this model, your application is authorized through interactions with pages displayed by Amazon and by your website.

So in this model, the selling partner cannot get a token like MWS Authorization Token to authorize your application with Seller Central.

Therefore, answering your question:

  1. Yes, it is possible. You can authorize your application to access a different selling partner account. This documentation on section 5. To self-authorize your application (seller application) walks you through it.

If the information available in the documentation link provided above does not fully resolve your inquiry, please open a support case with us.

Best, Leonardo Nakagawa Solutions Architect, Selling Partner API Developer Support

jjmg1945 commented 1 year ago

Hi Leonardo,

Web tries to log in with our customer account to authorize but an error message was displayed saying that the account had not related with application ID.

Thanks

leonardonakagawa commented 1 year ago

Hi @jjmg1945,

I cannot reproduce your error on my side. Although, you need to ensure that you are logging with the right account credentials, then it will redirect you to the same Self-Authorization page but now with the respective seller for you, generate a refresh_token to use.

Could you send us a screenshot of the error message?

Thanks,

Leonardo

jjmg1945 commented 1 year ago

Hello @leonardonakagawa,

I followed the next steps:

  1. Login in my developer account
  2. Go to authorization page and click in sign in with other account, as explain the procedure in your previous post.
  3. Send the sign in link to my customer
  4. Customer tries to enter his credentials and get this error:

Polish_20230901_203648967

Thanks a lot for your help

leonardonakagawa commented 1 year ago

Hi,

This workflow is intended for you as a private developer to authorize multiple seller account's under your domain (from your company) with each seller credential's in your browser. It does not allow sharing the URL with an external customer. For that, you will need to implement the website OAuth workflow, and this will require you to convert your developer profile to public.

For more details, you can check this documentation Authorization Limits.

If the information available in the documentation link provided above does not fully resolve your inquiry, please open a support case with us.

Best, Leonardo

jjmg1945 commented 1 year ago

Hi,

Thanks for your support.

Regards