Invalid redirect URI on spotify auth
I try to auth user through my app with spotify Web API but I receive this error:
INVALID_CLIENT: Invalid redirect URI
URL:
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-email
I cant see where is the problem... Can you help?
Solution 1:
You have to add the redirect URI to the White-list in "My Applications" panel.
e.g http://example.com/callback/
Solution 2:
app.js:
var redirect_uri = 'http://localhost:8888/callback';
(https://developer.spotify.com/dashboard) Spotify > My application:
http://localhost:8888/callback
Dont forget to save.