question

Phynart avatar image
Phynart asked

Not able generate token for proactive events, getting "The request has an invalid parameter : scope"

alexa
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Perhaps you could let us know how you are attempting to generate the token ?

In code (if so, what language) ? Using curl (if so, show us the curl expression) ?

Give us some information / code snippets etc and we can 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.

Phynart avatar image
Phynart answered

Sure, thanx for responsre.


I have tried using postman and curl.


Using postman:

POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=(clientID)&client_secret=(clientSecret)&scope=alexa::proactive_events

Using curl:,

curl -i -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=xxxx&client_secret=yyyy&scope=alexa::proactive_events' https://api.amazon.com/auth/o2/token


For both i received this error:

{"error_description":"The request has an invalid parameter : scope","error":"invalid_scope"}


10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Just tried using curl and a postman-like tool, both work fine and give me an access token.

It would seem to me that you're not providing a scope value of alexa::proactive_events, is the scope value *exactly* alexa::proactive_events ? Must have the alexa:: prefix, with two colons.

Paste up the command line request you're sending (the *exact* command) and the response you get. Blank out the client_id and secret used when posting up.

10 |5000

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

Phynart avatar image
Phynart answered

Thanx for response sir, i checked manfiest schema for this. It needs some changes for proactive events, so its working now.


Thank you for your quick response and valuable time.

10 |5000

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