Skip to content
DocumentationAPI Reference

Seek To Position

me.player.seek_to_position(PlayerSeekToPositionParams**kwargs)
PUT/me/player/seek

Seeks to the given position in the user’s currently playing track. 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
position_ms: int

The position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.

device_id: Optional[str]

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

Seek To Position

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
client.me.player.seek_to_position(
    position_ms=25000,
)
Returns Examples