question

benghopy avatar image
benghopy asked

libcurl post return INVALID_REQUEST_EXCEPTION error

Hi, I just used libcurl post a request to AVS it return like: {"header":{"namespace":"System","name":"Exception","messageId":"80634b9a-f328-4029-a4ce-ce953dcf1e1a"},"payload":{"code":"INVALID_REQUEST_EXCEPTION","description":"Unexpected end-of-input: expected close marker for OBJECT (from [Source: [LineReaderInputStreamAdaptor: [pos: 0][limit: 0][]]; line: 1, column: 0])\n at [Source: [LineReaderInputStreamAdaptor: [pos: 0][limit: 0][]]; line: 1, column: 431]"}} How can I fix it ?
alexa voice service
10 |5000

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

elstryan@Amazon avatar image
elstryan@Amazon answered
Hi Benghopy, The cause of this exception is that the JSON message received by AVS from your request is not formatted correctly. Can you verify that for whichever API you are using the JSON that you are sending with your request conforms to the API documentation: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/content/avs-api-overview. Can you share an example of a body of a request that you are attempting to send?
10 |5000

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

Ara avatar image
Ara answered

Hi Benghopy, would it be possible to have a snip of your code using the libcurl. I just started to look at implementing Alexa support using libcurl and a sample code will really give me a good statrt! :)

10 |5000

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

newuser-c942babc-177c-4086-b650-eaabcea5c1fa avatar image
newuser-c942babc-177c-4086-b650-eaabcea5c1fa answered

????????????????????

10 |5000

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