Closed TimHi closed 1 year ago
Issue on my side, after checking the implementation of WithScopes I saw my error. This works now:
var (
auth = spotifyauth.New(spotifyauth.WithRedirectURL(redirectURI), spotifyauth.WithScopes(spotifyauth.ScopeUserFollowRead, spotifyauth.ScopeUserReadPrivate, spotifyauth.ScopeUserTopRead), spotifyauth.WithClientID("CLIENTID"), spotifyauth.WithClientSecret("SECRET"))
ch = make(chan *spotify.Client)
state = "abc123"
)
I'm running into an issue when using ScopeUserTopRead and ScopeUserFollowRead together.
I've checked the scopes reference to see if there is some kind of mutual exclusiveness between the two scopes but it doesnt seem like it.
My authentication is built like this:
The CurrentUsersFollowedArtists endpoint works fine, but the CurrentUsersTopArtists/CurrentUsersTopTracks are returning errors:
If I remove the
spotifyauth.WithScopes(spotifyauth.ScopeUserFollowRead)
and build my auth like this:I'm receiving valid responses from the CurrentUsersTopArtists/CurrentUsersTopTracks endpoints. (CurrentUsersFollowedArtists doesnt work anymore since the scope is missing).
Am I doing something wrong in building the scopes?
Edit:
I just tried moving positions of the scopes, resulting in an insufficient scope error: