Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Please see below the most popular frequently asked questions.
Loading article...
Loading faqs...
Please see below the current ongoing issues which are under investigation.
Loading issue...
Loading ongoing issues...
I'm trying to develop a test app using Python and spotipy.
Everything worked fine yesterday. But today when the app tries to obtain a token, I'm getting a browser window opened saying "INVALID_CLIENT: Invalid client".
The actual code looks like this:
import spotipy
[...]
scope="playlist-read-collaborative playlist-modify-public playlist-read-private playlist-modify-private user-read-email user-read-private user-library-modify user-library-read"
spotify=spotipy.Spotify(auth_manager=spotipy.SpotifyOAuth(
client_id='1de87466we774e0a913abbe49181e718',
client_secret='<my_secret_here>',
scope=scope,
redirect_uri="http://127.0.0.1:9009/"))
[...]
playlist=spotify.user_playlist_create('<myuser>',"Test playlist 1",public=True)
[...]
As soon as I reach the playlist creation part, the library notices that it doesn't have current token so it tries to authenticate me to get one.
It ends with browser opening a window for
https://accounts.spotify.com/authorize?client_id=1de87466we774e0a913abbe49181e718&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1%3A9009%2F&scope=playlist-read-collaborative+playlist-modify-public+playlist-read-private+playlist-modify-private+user-read-email+user-read-private+user-library-modify+user-library-read
with said "INVALID_CLIENT: invalid client" message from a 400 Bad Request response.
The client id is the proper one - I did copy-paste it from my dashboard and I checked it several times. The secret also is OK (I even reset the secret just to be on the safe side).
The most interesting thing is that I think it used to work properly and now it's not working.
I thought that maybe the app got temporarily blocked because of hitting rate limits but as far as I know, the urllib3 on which spotipy is built honors the 429 and Retry-After header. Anyway I'd expect a 429 response instead of a 400 Bad Request
Any ideas? Because I'm stuck here 😕
**bleep**. I feel so stupid. I must have checked it a thousand times and still got a typo. There is one "2" that somehow got changed into "w" in the client_id parameter. I have no idea how I managed to do it since I tried copy-pasting it to be sure that I didn't actually make a typo.
Anyway, it seems that's solved.
Im still having this exact problem, any adivice
@wyanaveen, you can try to add the playlist-modify-private and the playlist-read-private scopes.
Well not come
I have the same problem with "Authorization Code with PKCE Flow". Code can be obtained from Spotify but the POST-request for the access token fails. The error "invalid_client" does not say much.
I wanted to migrate from Implicit grant flow (which worked well) but it's a bit difficult with so little information. Could anybody achieve PKCE? Can Spotify provide more detailed information/error message, at least which data does not match? Would be much appreciated!
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…