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
612 stars 736 forks source link

[BUG] [SP-API] Error Code: MD1000 when the seller account is trying to authorize #2744

Closed linky225 closed 10 months ago

linky225 commented 11 months ago

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

I have the similar issue as amzn/selling-partner-api-models#918, but I don't know how OP got to manage to solve their issue.

I followed this: https://developer-docs.amazon.com/sp-api/docs/website-authorization-workflow

I stated the application_id as my Client Id which goes as "amzn1.application-oa2-client.*****". I get this id from my security profiles/web settings on my non-seller amazon developer account.

Full link = https://sellercentral.amazon.com/apps/authorize/consent?application_id=amzn1.application-oa2-client.******************&version=beta

Expected Behavior

"Approve to authorize?" content appearing after the seller logged into their account, which will return the authorization information.

Current Behavior

After the seller signs in successfully,

It shows this error

image

Context/Screenshots

I'm trying to make few different seller accounts to authorize by logining in through my website, I need their token to manage their data. I will list them on my web app. To give more context, none of the seller account have Amazon developer account. I have only developer account to manage their data. I need their authorized token to achieve that.

stefnats commented 11 months ago

Well the error is described here:

https://developer-docs.amazon.com/sp-api/docs/sp-api-errors-frequently-asked-questions#why-am-i-getting-an-md1000-error-code-when-i-initiate-span-classnotranslateoauthspan-workflow

If you have an SP-API application that is not published but the OAuth workflow points to Production workflow, this error is returned. To resolve, confirm the application is in Draft stage. If so, add version=beta parameter to OAuth Authorization URI constructed. Once the application is published, this parameter can be removed.

So, please check your app state, if it's in draft mode or published. This has to do with it.

linky225 commented 11 months ago

@stefnats

My website is published, but currently for testing purposes, I specified the redirection uri to my localhost. I also specified version=beta in the link as it's https://sellercentral.amazon.com/apps/authorize/consent?application_id=amzn1.application-oa2-client.******************&version=beta

I'm trying to ensure the workflow of my code works in my website.

stefnats commented 11 months ago

hm maybe it has something to do with the redirect to localhost. so a few things to try

linky225 commented 11 months ago

@stefnats

It didnt change at all.

I don't use LWA SDK, all I try to do is to direct sellers by link in a new browser window, and they can login but the error is like that still.

leonardonakagawa commented 10 months ago

Hello @linky225 ,

Thank you for reaching out regarding MD1000.

Please, check if your application is in Draft or Prod stage. If the application is in Prod stage please remove the version=beta from the OAuth Authorization URI constructed.

You can find details regarding this in our Why am I getting an MD1000 error code when I initiate OAuth workflow?. If the information available in the documentation link provided above does not fully resolve your inquiry, please open a support case with us.

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