Announcements

Help Wizard

Step 1

NEXT STEP

[Spotify Web API] Can't read private playlists

[Spotify Web API] Can't read private playlists

I'm attempting to create my own project with just the Python requests module, and I'm pretty sure I put the scope thing in the right place...

 

response = requests.post(
        url='https://accounts.spotify.com/api/token',
        data={
            'grant_type':'client_credentials',
            'client_id': client_id,
            'client_secret': client_secret,
            'scope': 'playlist-read-private'
            },
        headers={ 'Content-Type':'application/x-www-form-urlencoded' },
    ).json()

 

However, I'm only able to access my public playlists. What am I doing wrong? Is there another place I have to put the scope field?

Reply
3 Replies

Since the Client Credentials flow does not include authorization, only endpoints that do not access user information can be accessed. Therefore, in this case, you should use a different Authorization method that lets you log in.

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.

I have the same query:

 

With my own credentials, I am unable to access my private playlists. Any solution?

You'll need to use the Authorization Scope  playlist-read-private to access private playlists.

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