question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request headers are not editable, causing problem with RDT

See original GitHub issue

Orders

To get more information about ShippingAddress and BuyerInfo from getOrders calls we have to pass restricted data token to request headers. Instead of using access token for x-amz-access-token, we need to pass RDT.

As far as I see there is no way to reach request headers to edit it.

My Suggestion

response = Orders(**credentials).get_orders(**params, restricted_data_token="Atz.r|...")

Restricted data token is special for order endpoints. So I believe we can implement a usage like above.

I can work on it and open a pull request next 1 or 2 days.

What do you think?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
ethemgunercommented, Oct 19, 2021

Cool. I’ll look to update the method in Tokens to make that easier.

Already It’s really easy from this package but there are lots of things going on in Selling Partner API.

Again, thank you for your time and effort 👍

1reaction
ethemgunercommented, Oct 19, 2021

Strange, it worked for me. Can you show me the code you’re using including how you get the token?

This was my mistake. There is no problem with getOrders call but getOrderItems call was failing. I think we can’t use RDT for getOrderItems because for getOrders everything works fine.

Yet, from getOrders operation I took empty BuyerInfo. Probably, this is happening because of my application’s roles.

Anyway, I think this solution is perfect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Invalid packet line header' when trying to sync with certain hosts
This looks like a known bug that causes RSE connections to not work with synchronized projects. It was discussed on the ptp-dev mailing...
Read more >
('unauthorized_client', 'Not authorized for requested operation ...
I'm trying to access the Selling Partner API through Python. I followed the recommendations from this issue: #52. I have all the credentials,...
Read more >
Why is IE 10 Refusing to send POST data via jQuery $.ajax
The actual ajax request is going through, but no post data??? The request headers look normal: Request POST /steps/~do HTTP/1.1 ...
Read more >
Template talk:Railway line header - Wikipedia
Template talk:Railway line header · Severe breakage on narrower screens · rules="all" · overlapping text problem · Collapsed display · Whitespace problem caused...
Read more >
Adaptive transport | Citrix Virtual Apps and Desktops 7 1912 ...
Adaptive Transport switches to TCP when EDT is not available. ... incorrectly can cause serious problems that might require you to reinstall ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found