The Skip To Previous feature in the Spotify Web API exhibits ambiguous behavior. The POST method on the /me/player/previous endpoint behaves inconsistently. The expected outcome is to transition to the previous track. However, if the current track has been playing for an unspecified duration – roughly a few seconds (not mentioned in a documentation) – the method acts differently. This inconsistency constitutes a clear flaw in design. The functionality to restart the current track should be in a separate endpoint.
Furthermore, there is no definitive workaround for this issue. Two potential approaches might be considered:
A potential solution could be to return some information in the response indicating whether the track position was reset or the track itself was changed. Another backward-compatible solution might involve the option to pass a parameter enforcing the change of track.