question

Bcarbs avatar image
Bcarbs asked

Using postman to gain authorization code for dash:replenish

Hey there,

I'm trying to manually step through the LWA for websites using Postman so I can eventually copy the access token to my hardware device and use DRS triggered by some sensors. Below (with some details ....sanitized) is my POST to request authorization. This returns an HTTP 500.

I've also tried using Postman's built in Oauth2.0 access token tool, and that gets me to the authorization page,

I log in, grant access to my app...but then there is an error "could not complete oauth2.0 request" from Postman. I assume this is because the template on Postman doesn't allow for the scope_data field. But when I create the POST manually I don't even get to the authorization page.

Thanks for your help!!

apilogin 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.

Bcarbs avatar image
Bcarbs answered

Ah so i sort of figured this out...

I need to somehow format this bit

{"device_model":modelX,"serial":serialY}

to be x-www-form-urlencodded friendly

I've tried using

device_model%3Aeb9edf13-5a38-4d72-b7e5-37a788e144bf&serial%arduino1

in my post req but I receive an error back

"The scope data list you provided is invalid for your request"

I know this could be solved by using one of the app (java, js, etc) libraries to handle the Oauth handshakes but since my client is a constrained device I'd like to try to do this w/ out having to create an app/proxy.

10 |5000

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

Levon@Amazon avatar image
Levon@Amazon answered
10 |5000

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