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

POST restrictedDataToken #19

Open
HT808s opened this issue Aug 2, 2022 · 1 comment
Open

POST restrictedDataToken #19

HT808s opened this issue Aug 2, 2022 · 1 comment

Comments

@HT808s
Copy link

HT808s commented Aug 2, 2022

Is there a plan to include the call to restrictedDataToken?
It would be nice to have it, as an option

@Coffeeri
Copy link

Coffeeri commented Aug 17, 2022

I would be very pleased as well. I am trying fetch GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL reports and do not receive any PII data. Confusingly some report requests do not need the RDT, see Issue 615 (selling-partner-api-docs).

If implementation is necessary, this would be a rough outline:

  • Restricted Data Token (RDT) must be fetched and updated if RDT is expired before every request in scope
  • Path and dataElements must be defined for every RDT request
  • RDT must be used instead of LWA in header X-Amz-Access-Token, currently SignRequest(r *http.Request)
  • SignRequest(r *http.Request) uses simply the accessToken of the SellingPartner struct
  • The accessToken is set in the RefreshToken() function this would be the best place IMO to incorporate the RDT generation
  • One architecture hurdle would be the definition of Path and dataElements for every request, e.g. for reports it could be added into the ReportOptions

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

2 participants