Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

HTTPError: 403 Client Error: Forbidden for url: <PLAYLISTID>/tracks?position=0

Solved!

HTTPError: 403 Client Error: Forbidden for url: <PLAYLISTID>/tracks?position=0

My Python script that uses Spotipy stopped working yesterday after working fine for months.

The full error message is...

 

HTTP Error for POST to https://api.spotify.com/v1/playlists/<PLAYLISTID>/tracks with Params: {'position': 0} returned 403 due to Insufficient client scope.
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\spotipy\client.py", line 245, in _internal_call
response.raise_for_status()
File "C:\Program Files\Python310\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/playlists/<PLAYLISTID>/tracks?position=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "UpdatePlaylist.py", line 195, in <module>
spotify.playlist_add_items(PlayListID, TrackID1List, 0)
File "C:\Program Files\Python310\lib\site-packages\spotipy\client.py", line 1031, in playlist_add_items
return self._post(
File "C:\Program Files\Python310\lib\site-packages\spotipy\client.py", line 302, in _post
return self._internal_call("POST", url, payload, kwargs)
File "C:\Program Files\Python310\lib\site-packages\spotipy\client.py", line 267, in _internal_call
raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/playlists/<PLAYLISTID>/tracks?position=0:
Insufficient client scope., reason: None

 

The command that is failing is...

 

spotify.playlist_add_items(PlayListID, TrackID1List, 0)

 

Regards,

Anthony

 

Reply

Accepted Solutions
Marked as solution

Upgrading spotipy resolved the issue.

 

Regards,

Anthony

View solution in original post

3 Replies
Marked as solution

Upgrading spotipy resolved the issue.

 

Regards,

Anthony

Hi, I have the same issue but the upgrade didn't fix it - any ideas ? 

ERROR:spotipy.client:HTTP Error for POST to https://api.spotify.com/v1/playlists/<PLAYLISTID>/tracks with Params: {'position': None} returned 403 due to Insufficient client scope.
ERROR:root:Spotify API error in /saveRecommendations: http status: 403, code:-1 - https://api.spotify.com/v1/playlists/<PLAYLISTID>/tracks:
Insufficient client scope., reason: None

The issue seems to be fixed on Spotify's side ! ๐Ÿ˜

Suggested posts

Type a product name