question

Clodo avatar image
Clodo asked

Skill Home -> 400 Bad Request - An unknown scope was requested

I'm trying to connect Alexa to my personal KNX domotics.

I create an Alexa Smart Home Skill, create the Smart Home service endpoint AWS Lambda, configure in Alexa Developer Console the "Account Linking" with Amazon Login:

Authorization URI: https://www.amazon.com/ap/oa

Access Token URI: https://api.amazon.com/auth/o2/token

Client ID: amzn1.application-oa2-client.<my-hash>

Client Secret: <mysecret>

Client Authentication Scheme:

HTTP Basic Scope: SmartHome (only one item)

Domain List: <mydomain>

But when i open the Alexa App on Android -> My skills -> Skills for developer -> Activate -> it open a webview on

https://www.amazon.com/ap/oa?client_id=amzn1.application-oa2-client.<omissis> 

and throw an error

Ci dispiace.
Si è verificato un errore mentre cercavamo di elaborare la richiesta. Stiamo già lavorando per risolvere il problema il prima possibile. 

Error Summary 400 
Bad Request 
An unknown scope was requested 
Request Details 
client_id=amzn1.application-oa2-client.<my hash> 
response_type=code state=<lots of base64 chars> 
scope=SmartHome 
redirect_uri=https%3A%2F%2Flayla.amazon.com%2Fapi%2Fskill%2Flink%2FM1KF2U39ETRTXA

Any idea about what's wrong? Thanks.

skillsmart home
10 |5000 characters needed characters left characters exceeded

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

1 Answer

Nathan avatar image
Nathan answered

Hi Clodo,

It looks like you are using LWA (login with amazon) if this is the case I believe out of the box it will only support the following scopes.

scopeREQUIRED. The scope of the request. Must be profile, profile:user_id, postal_code, or some combination, separated by spaces (e.g. profile%20postal_code). For more information, see Customer Profile.

see link here.

Cheers

Nathan

1 comment
10 |5000 characters needed characters left characters exceeded

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

I confirm that I do have 'profile' scope in my skill. But I still get the above error. This is the background:

I followed all the steps in the tutorial https://github.com/alexa/alexa-smarthome/wiki/Build-a-Working-Smart-Home-Skill-in-15-Minutes and created a Smart Home skill. The skill works perfectly well for me.

Now I want someone else, who owns an Echo device but doesn't have an Amazon developer account, to test the skill independently. So I added his email id as a beta tester. (I could not find any other way to share a link to my skill).

When he tried to enable the skill, he got a 400 bad request error with the message: 'An unknown scope was requested'.

My original scope in the skill was 'profile'. Later I tried to add 'profile:email' and 'profile:user_id' but the error does not vanish.

0 Likes 0 ·