question

Mauro avatar image
Mauro asked ·

AVS - Recognize event Bad Request 400

Hello,

I've the following problem, i'm obtaining a bad request when I try to call the Recognize event

{"header":{"namespace":"System","name":"Exception","messageId":"a8fa859e-b125-4991-b75b-2e9aaf13c178"},"payload":{"code":"INVALID_REQUEST_EXCEPTION","description":"Bad Request"}}

I'm debugging the http request with a web debugging proxy, and seems to follow the correct structure, a pic attacched. I think that it's something related with the json, but i'm not able to find the mistake, i'm following the example of the website :

{"event":{"header":{"namespace":"SpeechRecognizer","name":"Recognize","messageId":"message-123","dialogRequestId":"dialogrequest-321"},"payload":{"profile":"CLOSE_TALK","format":"AUDIO_L16_RATE_16000_CHANNELS_1"}}} 

Maybe through the posted message-id there is some server log message that can help me. Thanks for the support



alexa voice servicealexa
request.png (73.5 KiB)
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Mauro avatar image
Mauro answered ·

I was being able to find a solution about it. The request was correct as it is showed on the screenshot. The only problem was with the carriage return (\r) and line feed (\n) that wasn't correctly typed at the end of every row. Hope this can help someone in future with a similar problem.

10 |2000 characters needed characters left characters exceeded

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