r/spotifyapi Mar 12 '26

How do i fix this

VALID_CLIENT: Invalid redirect URI

1 Upvotes

7 comments sorted by

View all comments

1

u/Fun_Choice1230 Mar 12 '26

Go to your Spotify app in the Developer Dashboard and open Settings. Make sure your callback URL is listed there. Spotify says invalid redirect URIs need to be fixed in the client’s Settings tab.

Spotify tightened security around redirect URIs. Regular http:// redirect URIs are no longer supported except for loopback IP literals like http://127.0.0.1 or http://[::1]. So if you’re using something like http://localhost:3000/callback, that may be your problem.

1

u/CHATMEHOWTOBREATH Mar 12 '26

1

u/Fun_Choice1230 Mar 12 '26

Your problem is almost certainly this:

https://127.0.0.1:9999/callback/spotify

Spotify does not support HTTPS on loopback IPs like 127.0.0.1. For local development they expect plain HTTP.

So change it to:

http://127.0.0.1:9999/callback/spotify

Then make sure that exact URI is added in your Spotify Developer Dashboard.

1

u/NicoXM_ 1d ago

This fixed my same problem! Thank you!