Recieving an “errorCode: ERROR_RESOURCE_GONE” when trying to send play command

  • 31 May 2021
  • 3 replies
  • 34 views

Badge

I have been trying to figure out the sonos api over the past few days, but unfortuanetly have hit a road block. I have already gotten my tokens and room names and and favorites Id, but when I send the curl request to play a song I get the error described above.

Curl Code : curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer {TOKEN}" "https://api.ws.sonos.com/control/api/v1/groups/RINCON_48A6B88A5B14014XX:XXXXXXXXXX/favorites" --data @play.json

I keep the body in a .json file called play which contains the code:

{ "favoriteId":2, "playOnCompletion":true }

I have not been able to find any documentation on this issue online, so any and all help is very appreciated.


3 replies

I haven’t fussed with the API, but you could have an issue with the play.json file path or permissions. Maybe you could attract the attention of @controlav.

Userlevel 7
Badge +20

I believe that discussion of the Sonos Cloud API takes place over on StackOverflow.

(Note that the local network UPnP API is generally more powerful, but is not officially supported.)

Userlevel 7
Badge +21

stackoverflow is the place for these and this Q has already been posted there, with some speculative replies. I have given up with the cloud API, the UPnP API is better in almost every aspect.

Reply