Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Access to Orders.ListOrders is denied' #150

Closed
Stefan2142 opened this issue Jul 5, 2020 · 8 comments
Closed

'Access to Orders.ListOrders is denied' #150

Stefan2142 opened this issue Jul 5, 2020 · 8 comments

Comments

@Stefan2142
Copy link

Stefan2142 commented Jul 5, 2020

When I try to run this code (in this issue i didnt include merchant id, access key and secret access key but they were provided in the original request):

client = MWS.orders(marketplace: "US",
                    merchant_id: "",
                    aws_access_key_id: "",
                    aws_secret_access_key: "")
response = client.list_orders('US', created_after: Date.new(2015))

I get (last line from traceback):
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/peddler-2.4.1/lib/peddler/client.rb:155:in `handle_http_status_error': Access to Orders.ListOrders is denied (Peddler::Errors::AccessDenied)

What am I doing wrong? Im getting the same error when using the amazon scratch pad

@travisrr
Copy link

travisrr commented Jul 5, 2020

this could be because the seller doesn't have the permissions needed to access List Orders as this function contains PII I believe...

@Stefan2142
Copy link
Author

Thanks for the response! I'm using my own, seller account to automate some order pulling from my store. What do you think, how can I obtain those permissions?

@hakanensari
Copy link
Owner

If I’m not mistaken, it’s the country code in the final call. When listing orders, you need to provide the marketplace ID.

@Stefan2142
Copy link
Author

If I’m not mistaken, it’s the country code in the final call. When listing orders, you need to provide the marketplace ID.

Hmm, I tried adding the marketplace id from here but still getting the same "Access denied" error. Code looks like this (i just didnt put in the id's and access key):

require "peddler"

client = MWS.orders(marketplace: "A2EUQ1WTGCTBG2",
                    merchant_id: "",
                    aws_access_key_id: "",
                    aws_secret_access_key: "")
response = client.list_orders('US', created_after: Date.new(2015))
puts response

Can the developer access key be rested somehow from my, seller, side?

@hakanensari
Copy link
Owner

I wasn't clear above; you need to use the ID when calling Client#list_orders.

@Stefan2142
Copy link
Author

Stefan2142 commented Jul 6, 2020

I wasn't clear above; you need to use the ID when calling Client#list_orders.

Sorry, but this is a bit confusing. These are the ID's im passing:

marketplace_id,
merchant_id,
aws_access_key_id,
aws_secret_access_key.

What other id's I need to pass? ID of marketplace? If it is that id, then this is the code im running:

require "peddler"

client = MWS.orders(marketplace: "A2EUQ1WTGCTBG2",
                    merchant_id: "",
                    aws_access_key_id: "",
                    aws_secret_access_key: "")
response = client.list_orders('A2EUQ1WTGCTBG2', created_after: Date.new(2015)) #same as id as the id of marketplace
puts response

And stll getting the
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/peddler-2.4.1/lib/peddler/client.rb:155:in handle_http_status_error': Access to Orders.ListOrders is denied (Peddler::Errors::AccessDenied)`

@hakanensari
Copy link
Owner

If you are still getting the same error, I'm thinking the issue indeed could have to do with access, as @travisrr was pointing out above. You could write to the MWS team through Seller Central to troubleshoot further?

By the way, not sure if it matters, but A2EUQ1WTGCTBG2 is Canada, not the US.

@Stefan2142
Copy link
Author

If you are still getting the same error, I'm thinking the issue indeed could have to do with access, as @travisrr was pointing out above. You could write to the MWS team through Seller Central to troubleshoot further?

By the way, not sure if it matters, but A2EUQ1WTGCTBG2 is Canada, not the US.

You were right, I dont have the required access. In fact, my dev creds have expired after 90 days of inactivity. So my status as developer is 'Disabled" and I have to go through process of re-applying. Bummer, but this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants