Announcements

Help Wizard

Step 1

NEXT STEP

Sonos speakers not showing in GET /player/devices

Solved!

Sonos speakers not showing in GET /player/devices

Plan: Premium plan

Country: USA

Device: Sonos One, Macbook Pro, Galaxy S9

 

My Question or Issue

I'm not able to see my Sonos speakers in the /player/devices list, despite actively playing to a device via Spotify Desktop on my Mac: 

 

√ ~ ⮕ curl -H "Authorization: Bearer <Valid Token>" https://api.spotify.com/v1/me/player/devices
{
  "devices" : [ {
    "id" : "<id>",
    "is_active" : false,
    "is_private_session" : false,
    "is_restricted" : false,
    "name" : "SNS004318",
    "type" : "Computer",
    "volume_percent" : 42
  }, {
    "id" : "<id>",
    "is_active" : false,
    "is_private_session" : false,
    "is_restricted" : false,
    "name" : "Galaxy S9",
    "type" : "Smartphone",
    "volume_percent" : 100
  } ]
}

 

I would expect several more speakers to show here.

 

I've reviewed the API recommendations, but as far as I can tell everything is correct. I am using the same account on both, and the device is available and active in the device picker. Any other suggestions?

Reply

Accepted Solutions
Marked as solution

Hey there, thanks for reaching out!

Let's dive into this. I've taken a look and it sounds like Sonos speakers are currently not supported to be controlled through this API (restricted device). You might be able to use the Sonos API to control Sonos devices: https://developer.sonos.com/reference/control-api/. Let me know if you have any questions!

Have a great day,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

2 Replies
Marked as solution

Hey there, thanks for reaching out!

Let's dive into this. I've taken a look and it sounds like Sonos speakers are currently not supported to be controlled through this API (restricted device). You might be able to use the Sonos API to control Sonos devices: https://developer.sonos.com/reference/control-api/. Let me know if you have any questions!

Have a great day,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Just curious as to why the Spotify Web Playback SDK can control Sonos devices, but the Spotify Web-Services API cannot?

 

One would think that the Spotify Web Playback SDK and the Spotify Web-Services API would perform the same when it comes to controlling the player, but (obviously) they don't.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random