Announcements

Help Wizard

Step 1

NEXT STEP

/v1/me/player/devices returns empty array

/v1/me/player/devices returns empty array

My Question or Issue
The /v1/me/player/devices endpoint returns empty list even when a spotify device is open.

 

Steps to reproduce:
1. Open Spotify on your Windows desktop machine (do not play anything)
2. Hit the /v1/me/player/devices endpoint. Notes: I am using a valid access token that was issued on behalf of a user, it also has the `user-read-playback-state` scope.

 

Expected Behavior:
The endpoint should return a list with 1 spotify device, the one I opened on step 1

 

Actual Behavior:
The endpoint returns an empty list.

 

Final Notes:
If I go and play some music on the spotify device opened on step 1 and hit the endpoint again, this time I do get the list with 1 spotify device.

 

In my opinion this is a bug because I can agree that the spotify device that is currently playing music should be marked as the active device, but I do not understand why the endpoint returns an empty array if I have a spotify device open but not playing music.

 

Any help would be much appreciated.
Thanks

Reply
10 Replies

Same problem here. And yes, I have already checked the possible reasons listed here.

 

I (kind of) understand if /v1/me/player/devices doesn't return a specific smartphone/tablet device while the app is not running - the device is technically "sleeping" in that case. But this also happens with my smart TV, Chromecasts and my custom Librespot server-side receiver.

 

These devices are technically always available, I can indeed always see them if I select the list of devices from the Android app, but I can't see them from the API endpoint, if not shortly after they've come online.

 

This definitely sounds like a bug: in theory the same list of devices should appear on the Spotify Android app and on the API endpoint, but this is currently not the case.

 

--EDIT--

 

Another way to bring the device "online" is to go through the app, select players and select the device. But is this supposed to be the expected behaviour for this endpoint - return only the devices that are either running the app or are currently paired through the app? How can the app discover them then - is there another endpoint for it? If Chromecasts and external players are indeed reported as "sleeping" when they are not actively paired to an app, and the endpoint doesn't return sleeping devices, then how can we retrieve them?

Hi guys, I'm suffering the same issue. This feature is crucial for the apps integrated with the Spotify API, I would like more attention from the maintainers. 
I also can confirm the issue was working a few months ago, my app was working fine with all devices ( Alexa's devices, phones, etc ). Cause we don't have API versions, I'm guessing that some bug was added. 

Thanks in advance, we really need this fix.

Yes please look at this! I am having the same issue with get devices and to transfer playback. Even on the same Wifi I get no devices, unless the app is up or the speaker is playing. I also can only transfer playback unless the app is up.

I think they don't care, it is really sad. 

Spotify people just don't give a s about these tickets, meaning they don't give a s about the people using their apis which is really unexpected and sad

It's unreasonable to just ignore a significant issue like this. I've been using Spotify for many years. Now I want to use the API to choose a device for playback. The API can't do it and I see Spotify doesn't respond to this issue for a very long time. Now I have to look for a different music provider, maybe Google Music.

Having the same problem but when I request to get device ids I am getting an error with the status of 401 even though my laptop's Spotify is active (playing). I am using a valid token to request, but somehow I am getting an error with the message No token provided or Permission is missing. I've searched a lot about this topic and used all the techniques, and seen some people getting device ids when the device is playing or smth like that.  Maybe I did something wrong, cause I am not a pro with API's. If is there any solutions I would appreciate the help.

screenshot_api_problem.jpg

Hey Spotify team. 
As @pablohgm said above: "This feature is crucial for the apps integrated with the Spotify API" 

I am developing a new app integrated to Spotify API. 
When I don't have Spotify opened (or in my cell, or in my laptop), I receive devices empty array... But when I open one of them, then it shows up in the devices array.
Please, provide us some solution for this. Some endpoint to "wake up" devices... or something.
Right now, I have to show a notification saying "Please user, open your Spotify app and come back to this app" **bleep**, I suppose 50% of users will just go away... 

Hi there,

Another dev here shouting for help with this issue. As said above, requesting the user to "wake" the devices by going to the Spotify app themselves is a far from idea journey for an integrated App. Waiting for this until I can deliver any meaningful functionality in my app.

Thank you.

There seems to be something wrong around devices in general. 
The GET /me/player is supposed to return a device. According to the API docs the device is a mandatory field. But it's not returning at all (not even null). Not when I play a track actively on the phone, computer or speaker. 

 

Also the here mentioned /me/player/devices endpoint does not work reliably. For me it returns one computer, but not the 2 other speakers. Sometimes it also returns a computer that wasn't turned on in the last 14 days and then it's gone again the next second. So it doesn't really matter if a device is sleeping or not. 
Why does it not return the exact same list that is visible in the Spotify first-party apps?

Suggested posts