Announcements

[All Platforms][Developer] Add Session Privacy Flag to "currently-playing" API endpoint

Reply

[All Platforms][Developer] Add Session Privacy Flag to "currently-playing" API endpoint

murui
Casual Listener

It does not appear that session privacy details are included in the "/v1/me/player/currently-playing" endpoint. As I would like to use this endpoint to implement a "What are users listening to" feature on an online community website, I would very much like to respect the privacy of my users and not publicly show details about tracks that are being listened to during a private listening session in Spotify.

 

Please add a boolean flag to this endpoint that indicates whether or not private session mode is enabled for the currently playing track.

3 Replies

Re: [All Platforms][Developer] Add Session Privacy Flag to "currently-playing" API endpoin

murraypaul
Music Fan
In the meantime you can get this information from the get-user-player endpoint.
https://developer.spotify.com/console/get-user-player

The return data includes device.is_private_session

Re: [All Platforms][Developer] Add Session Privacy Flag to "currently-playing" API endpoin

murraypaul
Music Fan

Actually the answer seems much simpler.
From a quick test, if a track is played in a private session (tested with the PC app), the currently-playing endpoint data is not updated. So you should be able to just use it, knowing that private session data will not be provided.

Re: [All Platforms][Developer] Add Session Privacy Flag to "currently-playing" API endpoin

murui
Casual Listener

I couldn't find anything in the documentation that clarifies this behaviour.

The question then is if I can expect this behaviour to stay consistent over time given that it seems undocumented?

SUGGESTED POSTS