zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.33k stars 284 forks source link

Not Able to add song to playlist using method AddTracksToPlaylist, error: 403 Insufficient client scope #198

Closed daveavi closed 1 year ago

daveavi commented 1 year ago

Currenty I am tinkering around with the Go Spotify API and I have been able to authenticate myself and receive the access token from the Spotify API. I am able to make reads like searching for my own playlists and generic searches. However, there are issues I am running into where when I try to add a song to an existing playlist of mine, I am getting an error of Insufficient client scope.

I have seen people have this issue while using the spotipy library for python, but I was wondering if it has come up before for the go library, and if so how should I go about it

strideynet commented 1 year ago

It sounds like you need to ensure you add the ScopePlaylistModifyPrivate and ScopePlaylistModifyPublic scopes to your call of spotifyauth.New.