Help Wizard

Step 1


Access tokens in Chrome

Access tokens in Chrome





Operating System

Windows 10


My Issue

I have a web app which uses Spotipy to hit the `current_user_top_tracks` endpoint. In Edge, the app successfully uses an access token to make the calls. In Chrome, the app finds the access token valid (or creates a refresh token) but returns a 403: "Insufficient client scope".

I tested the API directly using cURL with tokens from both browsers; the token from Edge works, but the one generated from making a request in Chrome returns a 403 again.

Has anyone else had problems with tokens in Chrome? I have tried the app in an Incognito tab and get the same result.

Any suggestions would be greatly appreciated.


3 Replies

As is often the way, after posting the above, the app started responding correctly in Chrome too!

Would still be very interested in anyone’s thoughts though. I’m glad its working but am none the wiser as to why. I’m pretty confident it wasn't related to browser caching, as I had not used the app in Chrome for some time and the token is stored in the server-side session.


Any insights or shared similar experiences would be appreciated.

I've had similar strange experiences with the Spotify API while making an app. 


I added spotify as a dependency implementation through "

implementation("")" and I have a bunch of simple calls made in my MainActivity. When the code generates a URI, sometimes it works to getting the user to the login page but other times it doesn't. It seems to fluctuate between these four states: 
- A blank screen
- Leads to the login screen, and when you sucessfully login and click agree, fails to redirect back to the application and run onActivityResult()
- Gives a "NullPointerException" error
- Gives a "serviceMemoryLeaked" Error
I don't really understand why the same code seems to successfully get the user to the login page but then doesn't work the next time, and why it never seems to be able to redirect the user back to the application after agreeing (essentially onActivityResult() that should be collecting the token never collects it, it never runs). 

Erm… think I might not have set my scope correctly! 🤦🏻‍

Suggested posts