selling-partner-api-sdk
selling-partner-api-sdk copied to clipboard
POST restrictedDataToken
Is there a plan to include the call to restrictedDataToken?
It would be nice to have it, as an option
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
-
PathanddataElementsmust be defined for every RDT request - RDT must be used instead of LWA in header
X-Amz-Access-Token, currentlySignRequest(r *http.Request) -
SignRequest(r *http.Request)uses simply theaccessTokenof theSellingPartnerstruct - The
accessTokenis set in theRefreshToken()function this would be the best place IMO to incorporate the RDT generation - One architecture hurdle would be the definition of
PathanddataElementsfor every request, e.g. for reports it could be added into theReportOptions