Stack Overflow: A New Way for Developers to Get Support for Alexa

Now you can find Alexa-specific tags and topics in the AWS Collective on Stack Overflow. Ask questions and get help from badged experts and the Alexa developer community!

question

newuser-77b7986c-db79-4439-88ce-0947a6d22467 avatar image

Progressive response in python is showing

Progressive response in python is showing

def progressive_response(event,context):
   
    token = event["context"]["System"]["apiAccessToken"]
    request_id = event['request']['requestId']
    headers = {"Content-Type": "application/json", "Authorization": "Bearer {}".format(token)}
    body = { 
        "header":{ 
            "requestId" : "{}".format(request_id)
        },
        "directive" : { 
            "type" : "VoicePlayer.Speak", 
            "speech" : "Ok, give me a minute "
        }
        }
    progressiveURL = "https://api.eu.amazonalexa.com/v1/directives"
    progressive = requests.post(progressiveURL, json=body, headers=headers)
   
    return progressive.status_code == 204
 

def temp_intent(event, context):
	
	x=5
	y=6
	if (x>y):
		progressive_response(event,context)  
		return "greater" 
alexa skills kitsdkpythonprogressiveresponse
1 comment
10 |5000

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

def progressive_response(event,context):
   
    token = event["context"]["System"]["apiAccessToken"]
    request_id = event['request']['requestId']
    headers = {"Content-Type": "application/json", "Authorization": "Bearer {}".format(token)}
    body = { 
        "header":{ 
            "requestId" : "{}".format(request_id)
        },
        "directive" : { 
            "type" : "VoicePlayer.Speak", 
            "speech" : "Ok, give me a minute "
        }
        }
    progressiveURL = "https://api.eu.amazonalexa.com/v1/directives"
    progressive = requests.post(progressiveURL, json=body, headers=headers)
   
    return progressive.status_code == 204
 

def temp_intent(event, context):
	
	x=5
	y=6
	if (x>y):
		progressive_response(event,context)
		return "greater" 
0 Likes 0 ·

1 Answer

Tsuneki@Amazon avatar image
Tsuneki@Amazon answered

Hi there,

Thank you for posting.

May I ask problem you are facing with?

10 |5000

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