Skip to content
DocumentationAPI Reference

Pause Playback

me().player().pausePlayback(PlayerPausePlaybackParamsparams = PlayerPausePlaybackParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
PUT/me/player/pause

Pause playback on the user's account. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

ParametersExpand Collapse
PlayerPausePlaybackParams params
Optional<String> deviceId

The id of the device this command is targeting. If not supplied, the user's currently active device is the target.

Pause Playback

package dev.cjav.spotted.example;

import dev.cjav.spotted.client.SpottedClient;
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient;
import dev.cjav.spotted.models.me.player.PlayerPausePlaybackParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        SpottedClient client = SpottedOkHttpClient.fromEnv();

        client.me().player().pausePlayback();
    }
}
Returns Examples