question

shanghox avatar image
shanghox asked

lwa-invalid scope

Similar to the getting started example,I'm trying to go to the Amazon login page with appropriate params and then redirect to a random URL. This is giving me "error_description=lwa-invalid-parameter-bad-scope&error=invalid_scope". My product info seems to be right. Here's the URL in question: https://www.amazon.com/ap/oa?client_id=amzn1.application-oa2-client.89aabb718c964b91b02d855967ec1a99&scope=alexa%3Aall&scope_data=%7B%22alexa%3Aall%22%3A%7B%22productID%22%3A%22jacobsalexatest%22,%22productInstanceAttributes%22%3A%7B%22deviceSerialNumber%22%3A%44423%22%7D%7D%7D&response_type=token&redirect_uri=https%3A%2F%2Flocalhost
alexa voice 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.

Eric@Amazon avatar image
Eric@Amazon answered
I decoded the URL you pasted, and I think I might have found your problem: Decoded URI: scope_data={"alexa:all":{"productID":"jacobsalexatest","productInstanceAttributes":{"deviceSerialNumber":D423"}}}&response_type=token&redirect_uri=https://localhost You'll notice that the device serial number is missing a quotation mark. Additionally, you don't seem to be specifying a port for the redirect_uri. You'll want to make sure that's expected (your sample server accepts traffic on port 80). Our sample uses port 3000.
10 |5000

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

shanghox avatar image
shanghox answered
Thanks for the help.
10 |5000

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