Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ask.launch
- def launch():
- content_type = "application/x-www-form-urlencoded;charset=utf-8"
- client_id = "amzn1.application-oa2-client.6a48deff5a334b37b23e28b39bb5a408"
- client_secret = "5928cafa0226a324f77bc65623abb922878183f5d863cc1cb643085391c24906"
- scope = "alexa::proactive_events"
- grant_type = "client_credentials"
- data = {"grant_type": grant_type, "client_id": client_id, "client_secret": client_secret, "scope": scope}
- r = requests.post("https://api.amazon.com/auth/O2/token", data=data, headers={"content-type": content_type})
- speech = render_template("welcome")
- reprompt = render_template("welcome_reprompt")
- return question(speech).reprompt(reprompt)
- {'error_description': 'The request has an invalid parameter : scope', 'error': 'invalid_scope'}
Add Comment
Please, Sign In to add comment