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

Scope changes after token refresh, 403

Scope changes after token refresh, 403

Plan

Premium

Country

Sweden

 

Device

Intel Nuc

Operating System

Ubuntu 22.04

 

My Question or Issue

I have an app that is under extended request quota. It's an app that daily gets a new spotify album id from another service for each user. It then creates (or update if i'ts an existing user) a playlist with the album. This code is run from my server every morning. Before any fetching or posting towards spotify is done i refresh the users authtoken, If i get a refreshtoken from the response i update the users refreshtoken, if there is no refreshtoken but only a authtoken i update the users authtoken.

I have approximately 150 users and for most of them it works fine, they get their playlist updated. But at the moment I have approximately 20 users that after the Refresh Token flow they cannot Delete playlist items from their playlist or Add Playlist Items to the playlist. However fetching album, playlist or playlist items still works fine.
The error I'm getting for DELETE and POST request is 403.
The scope im using are 

var scope = "playlist-modify-private playlist-modify-public";



And is done like this:

var queryParams = new Dictionary<string, string?>
{
{ "response_type", "code" },
{ "client_id", config["CLIENT_ID"] },
{ "redirect_uri", config["REDIRECT_URI"] },
{ "state", username },
{ "scope", scope }
};

var authorizationUrl = QueryHelpers.AddQueryString("https://accounts.spotify.com/authorize", queryParams);
return Results.Redirect(authorizationUrl);




When the user signs up to my app the playlist is created and that has worked for every user. So in my mind, this has something to do with the refresh token somehow.

Anybody that can point me in some direction or recognize this issue?

Kind regards!



Reply
0 Replies

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