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

403 forbidden error

403 forbidden error

 

My Spotify account is premium. When I am using "playlist-modify-private" scope I got this error "http status: 403" Also, I run my code and confirm the warning in the browser. Why could this be caused? Here my code:

import spotipy
from spotipy.oauth2 import SpotifyOAuth

sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
scope="playlist-modify-private",
redirect_uri="http://localhost:8888/callback",
show_dialog=True,
client_id=client_id,
client_secret=client_secret,
cache_path="token.txt",
))


results = sp.current_user_saved_tracks()


 
Reply
1 Reply

You are trying to read a user saved tracks with the playlist-modify-private scope.

You should use the user-library-read scope instead.

 

See the following page for all scopes: https://developer.spotify.com/documentation/web-api/concepts/scopes

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random