mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 08:05:55 +03:00
[GH-ISSUE #1229] playlist_items appears to target wrong endpoint #715
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#715
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gshorten on GitHub (Feb 23, 2026).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1229
I am trying to use playlist_items but am getting 403 error:
HTTP Error for GET to https://api.spotify.com/v1/playlists/5VubtQBdfMONZ4lL7ZEb3Y/tracks with Params: {'limit': 100, 'offset': 0, 'fields': None, 'market': None, 'additional_types': 'track'} returned 403 due to Forbidden
I've got proper scopes because all the other spotipy functions that use the same scope (and others) such as getting a list of playlists, getting top tracks, starting and stopping play, etc. work as expected. Just playlist_items fails.
snippet:
wbcurrent = '5VubtQBdfMONZ4lL7ZEb3Y'
wbtracks = sp.playlist_items(playlist_id=wbcurrent,additional_types=("track",))
(I've also tried "tracks")
I'm not really competent to comment on this but a quick look seems like the spotipy code appears to use a depreciated endpoint?
see f"playlists/{plid}/tracks" below. Should this be "items" instead of "tracks"?
def playlist_items(
self,
playlist_id,
fields=None,
limit=100,
offset=0,
market=None,
additional_types=("track", "episode")
):
""" Get full details of the tracks and episodes of a playlist.
Thanks, if it is something else that I am doing wrong please point me in the right direction.
@gshorten commented on GitHub (Feb 24, 2026):
Update, Claude suggested either changing the endpoint in my local spotipy source or call the spotify endpoint directly. Both worked. I can now list playlist tracks.
@tonarec commented on GitHub (Feb 24, 2026):
This is a known issue, all enpoints using
/tracksare deprecated by Spotify and should use/itemsinstead, see the API referenceIt's related to this issue #1227, and will be fixed in this PR #1228
@gshorten commented on GitHub (Feb 25, 2026):
Thanks! That was fast! Also having problems with deleting tracks from a
playlist. Maybe same class of problem, changed endpoints?
On Tue, Feb 24, 2026 at 3:01 PM Cédric Tonarelli @.***>
wrote:
--
Geoff Shorten
403.471.6134 (c)
403.251.6015 (h)
2008 38th Avenue SW
Calgary, Alberta
T2T 2K4