question

Dan Siewers avatar image
Dan Siewers asked

Standard Type Cards?

I can't seem to be able to send a Standard card back in a response. When I test in the service simulator I get "The response is invalid". Here's the response that's being sent back. As you can see I'm not even trying to send a graphic. { "version": "1.0", "response": { "outputSpeech": { "ssml": "Some response", "type": "SSML" }, "shouldEndSession": false, "reprompt": { "outputSpeech": { "ssml": " I'm still here for you ", "type": "SSML" } }, "card": { "text": "Some text", "type": "Standard", "title": "The card title" } } }
alexa skills kitdebugging
10 |5000

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

Dan Siewers avatar image
Dan Siewers answered
OK, so I found the stupid mistake in my code with the malformed SSML. Fixed that, added graphic cards and now something else is happening. The card pops up and includes the text and graphic on my Fire TV and Alexa app. However, the Service Simulator still gives me "The response is invalid method". If I remove the card from JSON response it works in Service Simulator. Is this normal?
10 |5000

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

ciacco avatar image
ciacco answered
You are quite correct. The Service Simulator code is doing some processing/deserialization of responses it receives from skills. It's not just displaying the json that it receives. We know this because you can have your skill respond with a proper json response, but have some of the content not pass validation, and the Service Simulator will display the same message you're seeing now: "The response is invalid". For example, do a Simple Card, specify the SSML, but for the ssml value don't include the tags within the string. The response deserializes properly, but they do some processing on the content to make sure it's valid - and then they reject it. The point is, I'm testing it here and returning valid Standard Cards which are playing successfully through the Echo. But when I try to play them through the Service Simulator I'm getting the "The response is invalid" error. From their code release on Wednesday we discovered that the Service Simulator is not using the same servers for processing the service responses. It's running an older version of their code. And that's what's going on here again. It's just not updated to support Standard Cards yet. Sloppy.
10 |5000

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

memo@amazon avatar image
memo@amazon answered
The issue with the simulator has been fixed and it should behave as expected.
10 |5000

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