question

Ara avatar image
Ara asked ·

Are there new changes to AVS APIs (v20160207)

for one thing I noticed that AVS is returning "Bad Request" on my SyncState Event context json that it was working fine until yesterday. I also noticed that playBehavior parameter of AudioPlayer now has three options (it used to be two). Some of the diagrams are looking different as well. Am I right? Are there more changes or this was always the same? (I'm using our own curl base AVS client implementation)

alexa voice serviceapi
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

sherritt@amazon avatar image
sherritt@amazon answered ·

There have been no changes to the AVS APIv20160207. The Play directive playBehavior has always had three values in v20160207: REPLACE_ALL, ENQUEUE, and REPLACE_ENQUEUED.

If you provide an example of the a SynchronizeState event which used to work and is now returning a "Bad Request" result, I can look at it for anything which might help.

3 comments
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.

Many thanks!

This is the System/SynchronizeState message that I'm sending over the downstream after establishing it (through a GET request).

'{ "context": [{ "header": { "namespace": "AudioPlayer", "name": "PlaybackState" }, "payload": { "token": "", "offsetInMilliseconds": 0, "playerActivity": "IDLE" } }, { "header": { "namespace": "Speaker", "name": "VolumeState" }, "payload": { "volume": 50, "muted": false } }, { "header": { "namespace": "SpeechSynthesizer", "name": "SpeechState" }, "payload": { "playerActivity": "FINISHED", "token": "", "offsetInMilliseconds": 0 } }, { "header": { "namespace": "Alerts", "name": "AlertsState" }, "payload": { "allAlerts": [{ "scheduledTime": "", "token": false, "type": "" }], "activeAlerts": [{ "scheduledTime": "", "token": false, "type": "" }] } }], "event": { "header": { "namespace": "System", "name": "SynchronizeState", "messageId": "MsgId-6wz1WB0rbCX3hCHcbEW" }, "payload": { } } }'

INVALID_REQUEST_EXCEPTION - Bad Request

0 Likes 0 ·

Your problem is that you have "token": false for "allAlerts", and "activeAlerts", it should be a string and not a boolean.

0 Likes 0 ·

Oops! Many thanks!

0 Likes 0 ·