question

newuser-27ff4b30-70af-4199-81f6-60bb17c47495 avatar image

BAD_LWA_TOKEN

Right now I'm trying to use the Legacy DRS APIs and am currently stuck trying to give users access to the settings page where they can configure the ASIN they want to reorder for a given slot.


https://drs-web.amazon.com/settings?access_token=foobar

Documentation here: https://developer.amazon.com/docs/dash/device-management-and-settings.html


I have a valid access token (Atza|IwEBIBdhS1E-4yP8TJgrNBJ0i...) but whenever I navigate to the above URL using my access token I always get the following response in the URL: "drs-web.amazon.com/401?reason=BAD_LWA_TOKEN. "

Inspecting network requests, I see that my initial query for the "/settings" page results in a "302 Found" status but it always redirects to "drs-web.amazon.com/401?reason=BAD_LWA_TOKEN". I've tried encoding the access token as well, still with no luck.


Am I missing something? Is the documentation incorrect or am I hitting the wrong URL here?

Any and all help would be appreciated.

login with amazondash replenishment service
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi there,

Access token is valid for 1 hour. After that you have to request a new one with a refresh token. Thanks!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.