Skip to content

Support for Progressive Responses#250

Open
themooer1 wants to merge 8 commits into
johnwheeler:masterfrom
themooer1:master
Open

Support for Progressive Responses#250
themooer1 wants to merge 8 commits into
johnwheeler:masterfrom
themooer1:master

Conversation

@themooer1
Copy link
Copy Markdown

@themooer1 themooer1 commented Feb 7, 2019

@imsurinder90
Copy link
Copy Markdown

Can someone look into this? I need to use.

Comment thread flask_ask/models.py
"""Causes Alexa to speak before your skill sends its full response."""
response = {
"header":{
"requestId":"amzn1.echo-api.request.xxxxxxx"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't hardcode request Id

Comment thread flask_ask/models.py Outdated


headers = {"Authorization":'Bearer '+authToken, "Content-Type":"application/json"}
r = requests.post("https://api.amazonalexa.com/v1/directives", headers=headers, json=response)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL is region specific, for me this URL is not working,

This URL "https://api.eu.amazonalexa.com/v1/directives" is working for me.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It is no longer region specific.

Comment thread flask_ask/models.py Outdated
"speech":"This text is spoken while your skill processes the full response."
}
}
response['header']['requestId'] = context.System.apiAccessToken
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assign request id not AccessToken

@themooer1 themooer1 closed this May 19, 2019
@themooer1 themooer1 reopened this May 19, 2019
Correct Request ID
US Alexa API endpoint no longer hardcoded.
Sends speech with response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants