I try to auth user through my app with spotify Web API but I receive this error:

INVALID_CLIENT: Invalid redirect URIURL:

GET https://accounts.spotify.com/authorize/?client_id=6ae90bf75bf748c8874a75d16682f0c5&response_type=code&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&scope=user-read-private%20user-read-emailI cant see where is the problem... Can you help?



You have to add the redirect URI to the White-list in "My Applications" panel.

You are watching: Invalid_client: invalid redirect uri

e.g http://example.com/callback/



var redirect_uri = "http://localhost:8888/callback";(https://developer.spotify.com/dashboard) Spotify > My application:

http://localhost:8888/callbackDont forget to save.



I ran into a similar issue when authenticated via Authorization Code Flow.

Per the docs The value of this parameter must exactly match the value of redirect_uri supplied when requesting the authorization code.So make sure that the:

redirect_uri that is configured in the dashboard

is exactly the same or else you will get a INVALID_CLIENT: Invalid redirect URI

Navigate to your Spotify developer dashboard and open the project you are working on.

Next click "edit settings" and look for the redirect URIs field.

Put your redirect URI in the field. ex: http://localhost:8888/callback

Click save.

You should be good

First. You have to be sure that you"re using app.js from authorization_code directory.

Second. Be sure you edited app.js. That third line is important.

var client_id = "---"; // Your client idvar client_secret = "---"; // Your secretvar redirect_uri = "http://localhost:8888/callback"; // Your redirect uri - EXAMPLE
I use the SpotifyAPI-NET API wrapper by JohnnyCrazy and was having this problem despite adding the URL I specified in my wrapper call to my white list as specified above.

The browser"s address bar should show the redirect URL it is using buried in the middle of the string - I found that it was also making a request with "https://accounts.spotify.com:8000/authorize" as the redirect URL - perhaps the wrapper is making 2 API calls, but I found that only by whitelisting both this URL and the one I was specifying would it work for me.

This is super specific, so make sure you have exact url in each place.

In my app dashboard on spotify I had:http://localhost:3005/

And my url is:https://accounts.spotify.com/authorize?client_id=XXXXXXXXXXXXXXXXX&response_type=code&redirect_uri=http%3A%2F%2Flocalhost:3005/&scope=user-read-currently-playing%20user-top-read

Note the trailing slash in both places.

This error also appears when the redirect_uri is missing in the request. I figured that out the hard way due to writing "redirect_url" (with an L) instead.

Took me way too long to figure out. Hopefully this can save someone else some time.

+1 to adding "http://localhost:8888/callback" to the Redirect URIs list in your App"s settings via https://developer.spotify.com/dashboard/applications

It"s a shame this is not mentioned on the quick start:https://developer.spotify.com/documentation/web-playback-sdk/quick-start/

Include a path after the first pair of forward slashes. For example: Your app name is My Awesome App The redirect URI may be my-awesome-app-login://callback or awesomeprotocol123://returnafterlogin.

See more: La Santa Muerte Oraciones Para El Amor, Book Libro La Santa Muerte Rituales Para

For more information please refer this link Spotify Redirect URI Example

I played around with various URLs for some time, none of them gave me the correct functionality except http://localhost:8888/callback/ (note the trailing slash). Be sure to add that to the whitelist as well.

Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you're looking for? Browse other questions tagged authentication spotify or ask your own question.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.9.23.40291

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.