getCurrentlyPlaying

suspend fun getCurrentlyPlaying(additionalTypes: List<CurrentlyPlayingType> = listOf( CurrentlyPlayingType.Track, CurrentlyPlayingType.Episode ), market: Market? = null): CurrentlyPlayingObject?(source)

Get the object currently being played on the user’s Spotify account.

Requires either the SpotifyScope.UserReadPlaybackState or SpotifyScope.UserReadCurrentlyPlaying scopes

Api Reference

Parameters

additionalTypes

A list of types to return in addition to CurrentlyPlayingType.Track. Ad type not allowed.

market

If a country code is specified, only shows and episodes that are available in that market will be returned. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter. Note: If neither market or user country are provided, the content is considered unavailable for the client. Users can view the country that is associated with their account in the account settings. Required for SpotifyAppApi, but you may use Market.FROM_TOKEN to get the user market