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
580 stars 730 forks source link

OAuth authorization URI not working #941

Closed aryatekpia closed 1 year ago

aryatekpia commented 3 years ago

Our application uses SP-API

To allow our users to authorize they seller central account with our Application we have followed the guideline for website workflow.

So the users clicks on an authorize button on our application that will redirect them to: https://sellercentral.amazon.com/apps/authorize/consent?application_id=amzn1.sellerapps.app.xxxxxxxx-xxxx-xxxxx-aa0e-352f2b01d9c2&state=57e6980c-9e70-4761-945f-ca4914cbff03

After clicking on this button the user is taken to seller central and after they login instead of seeing the consent page and redirecting back to our application they are getting a form that asks for our developer id.

this is not the behaviour described in the documentation and it is a blocker for our app because being a SP-API app we don't even have a developer id https://github.com/amzn/selling-partner-api-docs/blob/main/guides/developer-guide/SellingPartnerApiDeveloperGuide.md#website-workflow

krithic15 commented 3 years ago

@slopeofhope81 Yes, that's correct. Authorizing a hybrid app in draft or published state will not affect your current MWS API call workflow.

Best, Krithi, Solutions Architect, SP API

slopeofhope81 commented 3 years ago

@krithic15 I just tested my hybrid app. But I am not receiving mws_token.. This is my application_id: amzn1.sellerapps.app.083f9454-2663-4d72-a0c3-15a9cc692e28

thanks!

krithic15 commented 3 years ago

@slopeofhope81,

I have reached out to the concerned team. Will keep you posted. Thank you for your patience.

Best, Krithi, Solutions Architect, SP API

@krithic15 I just tested my hybrid app. But I am not receiving mws_token.. This is my application_id: amzn1.sellerapps.app.083f9454-2663-4d72-a0c3-15a9cc692e28

thanks!

@slopeofhope81,

I have reached out to the concerned team to look into this. Will keep you posted. Thank you for your patience.

Best, Krithi, Solutions Architect, SP API

slopeofhope81 commented 3 years ago

@krithic15 Hi could I get update? And let me know if there is anything on my end could help you out. But I think it should be a configuration issue on your end..

krithic15 commented 3 years ago

@krithic15 Hi could I get update? And let me know if there is anything on my end could help you out. But I think it should be a configuration issue on your end..

Hi @slopeofhope81, Can I have the merchant ID on behalf of whom you performed the oauth handshake and also the timestamp?

Best, Krithi, Solutions Architect, SP API

slopeofhope81 commented 3 years ago

@krithic15 this is the merchant_id A2DUV77ZY92B2O and May 20th around 2:00PM EST. I can rerun the flow. let me know if the aforementioned is not sufficient.

krithic15 commented 3 years ago

@krithic15 this is the merchant_id A2DUV77ZY92B2O and May 20th around 2:00PM EST. I can rerun the flow. let me know if the aforementioned is not sufficient.

@slopeofhope81 Thank you for the details. We were able to identify the issue on our end and have fixed it. Please try authorizing again and let us know if you still face issues.

Best, Krithi, Solutions Architect, SP API

slopeofhope81 commented 3 years ago

@krithic15 I just tested on my end and it works with that particular account. I will test with another seller's account once I get a hold of it next week. Also could you share what the issue was? I would appreciate that! Thanks in advance!

krithic15 commented 3 years ago

@krithic15 I just tested on my end and it works with that particular account. I will test with another seller's account once I get a hold of it next week. Also could you share what the issue was? I would appreciate that! Thanks in advance!

@slopeofhope81 It was a configuration issue in our back-end and I can confirm that it is not a user issue. Thank you for reporting this and apologies for the inconvenience caused!

Best, Krithi, Solutions Architect, SP API

SouravPal95 commented 3 years ago

I have created an endpoint that returns the OAuth URI. But upon visiting the URI, clicking on the confirm button does not do anything.

ShivikaK commented 3 years ago

Hello @SouravPal95

For confirm button to work correctly, you need to have both OAuth Login and Redirect URI information added to your application. Please verify if both details are added to your application by clicking on "Edit App".

Thanks, Shivika Khare Selling Partner API Developer Support

SouravPal95 commented 3 years ago

Hello @SouravPal95

For confirm button to work correctly, you need to have both OAuth Login and Redirect URI information added to your application. Please verify if both details are added to your application by clicking on "Edit App".

Thanks, Shivika Khare Selling Partner API Developer Support

what should be the OAuth login URI? Unfortunately, I haven,t been able to locate this information in the DOCS

ShivikaK commented 3 years ago

Hello @SouravPal95 For confirm button to work correctly, you need to have both OAuth Login and Redirect URI information added to your application. Please verify if both details are added to your application by clicking on "Edit App". Thanks, Shivika Khare Selling Partner API Developer Support

what should be the OAuth login URI? Unfortunately, I haven,t been able to locate this information in the DOCS

The OAuth Login URI defines the login page of your website during authorization. This URI is shown after a seller consents to authorize your application.

You can find such information in our new GitHub FAQS - https://github.com/amzn/selling-partner-api-docs/wiki/SP-API---General-FAQs (What are the Login and Redirect URI values to be added in OAuth information when I am registering my app?)

Thanks, Shivika Khare Selling Partner API Developer Support

chrismeats commented 3 years ago

@krithic15 I have the same issue that slopeofhope81 was having in may. When I authorize an account I am not getting a mws_auth_token as part of the response. My App ID is: amzn1.sellerapps.app.cc957e72-44a9-4a2a-aca8-28541a629dc1

Let me know if you are able to help?

Edit: It appears this is only for the account that is the owner of the app. Is that expected behavior?

slopeofhope81 commented 3 years ago

@krithic15 I need your guidance! I have an application id amzn1.sellerapps.app.cc957e72-44a9-4a2a-aca8-28541a629dc1

when I tried to sign in via Oauth using the existing mws account (seller id = A2DUV77ZY92B2O), it gave back the mws token and the selling partner id and oauth code but the new account (seller id = A74ZY3D03JB37) is throwing MD5100 error.

what could be the reason for the different results? This is my oauth url https://sellercentral.amazon.com/apps/authorize/consent?application_id=amzn1.sellerapps.app.083f9454-2663-4d72-a0c3-15a9cc692e28&version=beta&state=07122340ecac65e7583e7fdc8dab87253e17622a25869729a2ab67a48c0bedc999fb2d2f%22

and finally, why is my app showing as suppressed? How do I update that?

Sincerely, Thanks

ogonki-vetochki commented 2 years ago

Hi! Can somebody clarify where should I get state token? Should I generate it on the application side or is it stored somewhere in AWS?

github-actions[bot] commented 1 year ago

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.

github-actions[bot] commented 1 year ago

closed for inactivity