Get Playback State
PlayerGetStateResponse Me.Player.GetState(PlayerGetStateParams?parameters, CancellationTokencancellationToken = default)
GET/me/player
Get information about the user’s current playback state, including track or episode, progress, and active device.
Parameters
Returns
Get Playback State
PlayerGetStateParams parameters = new();
var response = await client.Me.Player.GetState(parameters);
Console.WriteLine(response);{
"actions": {
"interrupting_playback": true,
"pausing": true,
"published": true,
"resuming": true,
"seeking": true,
"skipping_next": true,
"skipping_prev": true,
"toggling_repeat_context": true,
"toggling_repeat_track": true,
"toggling_shuffle": true,
"transferring_playback": true
},
"context": {
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"currently_playing_type": "currently_playing_type",
"device": {
"id": "id",
"is_active": true,
"is_private_session": true,
"is_restricted": true,
"name": "Kitchen speaker",
"published": true,
"supports_volume": true,
"type": "computer",
"volume_percent": 59
},
"is_playing": true,
"item": {
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
},
"progress_ms": 0,
"published": true,
"repeat_state": "repeat_state",
"shuffle_state": true,
"timestamp": 0
}Returns Examples
{
"actions": {
"interrupting_playback": true,
"pausing": true,
"published": true,
"resuming": true,
"seeking": true,
"skipping_next": true,
"skipping_prev": true,
"toggling_repeat_context": true,
"toggling_repeat_track": true,
"toggling_shuffle": true,
"transferring_playback": true
},
"context": {
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"currently_playing_type": "currently_playing_type",
"device": {
"id": "id",
"is_active": true,
"is_private_session": true,
"is_restricted": true,
"name": "Kitchen speaker",
"published": true,
"supports_volume": true,
"type": "computer",
"volume_percent": 59
},
"is_playing": true,
"item": {
"id": "id",
"album": {
"id": "2up3OPMp9Tb4dAKM2erWXQ",
"album_type": "compilation",
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"CA",
"BR",
"IT"
],
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"images": [
{
"height": 300,
"url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",
"width": 300,
"published": true
}
],
"name": "name",
"release_date": "1981-12",
"release_date_precision": "year",
"total_tracks": 9,
"type": "album",
"uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
"published": true,
"restrictions": {
"published": true,
"reason": "market"
}
},
"artists": [
{
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"name": "name",
"published": true,
"type": "artist",
"uri": "uri"
}
],
"available_markets": [
"string"
],
"disc_number": 0,
"duration_ms": 0,
"explicit": true,
"external_ids": {
"ean": "ean",
"isrc": "isrc",
"published": true,
"upc": "upc"
},
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"is_local": true,
"is_playable": true,
"linked_from": {
"id": "id",
"external_urls": {
"published": true,
"spotify": "spotify"
},
"href": "href",
"published": true,
"type": "type",
"uri": "uri"
},
"name": "name",
"popularity": 0,
"preview_url": "preview_url",
"published": true,
"restrictions": {
"published": true,
"reason": "reason"
},
"track_number": 0,
"type": "track",
"uri": "uri"
},
"progress_ms": 0,
"published": true,
"repeat_state": "repeat_state",
"shuffle_state": true,
"timestamp": 0
}