Hello
I have a smart home skill which always gets HTTP 400 (INVALID_REQUEST_EXCEPTION: The request was malformed) when sending an ActivationStarted response after a DeferredResponse.
Then Alexa complains after 8 seconds that the scene is not responding.
I can't find any typo or mistake in my response.
Do you have any idea what could cause it?
Here are the requests I make/receive when activating a home scene using a voice interaction.
- Voice interaction: "Alexa Turn on...", Payload Alexa -> skill:
{ "directive": { "header": { "namespace": "Alexa.SceneController", "name": "Activate", "payloadVersion": "3", "messageId": "4d4a5a20-57fb-4fe6-998d-1506667d20b2", "correlationToken": "AAAAAAAAAQ...bpnLQ==" }, "endpoint": { "scope": { "type": "BearerToken", "token": "SAvQ6...NdVRa" }, "endpointId": "a727ff14", "cookie": {} }, "payload": {} } }
- Synchronous response skill -> Alexa:
{ "event": { "header": { "messageId": "9764a7e8-7000-48db-b1cb-c65b475eff49", "namespace": "Alexa", "name": "DeferredResponse", "payloadVersion": "3", "correlationToken": "AAAAAAAAAQ...bpnLQ==" }, "payload": { "estimatedDeferralInSeconds": 1 } } }
- After about one second, Asynchronous response skill -> Alexa:
POST api.eu.amazonalexa.com/v3/events Authorization: Bearer Atza|IwEBIMP...qWuKNg Content-Type: application/json { "event": { "header": { "messageId": "a924392f-fedb-49b4-99da-0b05aa68bd7b", "namespace": "Alexa.SceneController", "name": "ActivationStarted", "payloadVersion": "3", "correlationToken": "AAAAAAAAAQ...bpnLQ==" }, "payload": { "cause": { "type": "VOICE_INTERACTION" }, "timestamp": "2019-02-21T15:59:22.381232Z" }, "endpoint": { "endpointId": "526cde62", "scope": { "type": "BearerToken", "token": "Atza|IwEBIMP...qWuKNg" } } } }
- Error HTTP 400 from Alexa -> skill:
{ "header": { "namespace": "System", "name": "Exception", "messageId": "333a8dff-f178-48a2-b19f-51460949c52b" }, "payload": { "code": "INVALID_REQUEST_EXCEPTION", "description": "The request was malformed." } }