question

newuser-0b00dd10-0bd3-4adb-96f6-49de8117034c avatar image

Issue while login to amazon with scope 'dash:replenish'

Hi,

I am developing dash App for Amazon DRS. While I am trying to login with amzone with scope 'dash:replenish' I am getting error. I have attached screen shot for that.

Basic Information.

Is DRS has location restriction?

Here is my sample code for login through web.

var options = new Object(); var scope = ('dash:replenish'); //'profile'; var scope_data = new Object(); scope_data['dash:replenish'] = { "device_model":"f933dcbb-98fd-4f97-80dc-7a0829a7888e","serial":"40:8d:5c:26:50:80","is_test_device":"true"}; options['client_id'] = "amzn1.application-oa2-client.15580d03b46c4ae6b6bae547cea3a93c"; options['scope_data'] = scope_data; options['scope'] = scope; options['response_type'] = 'code'; amazon.Login.authorize(options, function (response) { if (response.error) { console.log(response); alert('oauth error ' + response.error); return; } else { console.log(response.code); if (response.code) { that.dashService.callDash(response.code) .then((res) => { that.errorMessage = ""; }) .catch((err) => { if (err.message) that.errorMessage = err.message; else that.errorMessage = "Something went wrong!"; }); } } });

Highly appriciate your help

login with amazondash replenishment service
3 comments
10 |5000

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

Hi there, are you still experiencing this error? I don't see any screenshots attached to this post, could you please re-attach them? Thanks!

0 Likes 0 ·

Yes I am still facing this error!

0 Likes 0 ·
lwa.png (91.7 KiB)
lwaerr.png (36.7 KiB)

Thanks, the Dash team is looking into this, and we'll post here as soon as there are any updates. Thanks!

0 Likes 0 ·

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi there,

It looks like the problem is that you are trying to register a device with serial "40:8d:5c:26:50:80". The colon character ':' is not a valid character for DRS device serials. The serial must satisfy the following regular expression pattern [a-zA-Z0-9-+_]{1,64}. Please try again with a different device serial.

This information used to be provided in our developer guide, but I cannot find it anymore. It must have gotten dropped at some point when moving to Dev Portal. We will follow up with the docs team to put that info back. Thanks!

1 comment
10 |5000

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

Thanks Levon,

I really appreciate your help :D

1 Like 1 ·