-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error - INVALID_CLIENT: Invalid redirect URI #41
Comments
Hi there @cmorbaab . Remember that this redirect need to be handle by your app. In the particular case of |
Well, I have done the same @wandarkaf and it still says the same, any idea why? |
Solved!, all I had to do is go to the Spotify app and edit settings, then add the callback URL there as well |
would be nice to update the instructions to include this step. |
@CajetanRodrigues Hi ,I also met the problem . how could i solve the "INVALID_CLIENT: Invalid redirect URI ".I have edited settings in Spotify . but still show wrong.can you show the details to solve the problem? |
@Samantha-fu |
Hi Guys, My redirect uri in the code and app settings is: http://localhost:3000/ |
@kirildobrev919 I don't know whether it will work for you or not . Just try changing string interpolation to string concatenation in const accessUrl line. It worked for me. |
@Blazer-007 I tried your way and it worked. Then I tried interpolation again and it was fine. Then I realized that I accidentally inserted white space in my URL while doing it in several readable lines. Looks like the problem was there. |
@kirildobrev919 Glad to know that it works but for me when I rechanged it to interpolation it didn't work and neither I had spaces in url. I don't know why. |
@Blazer-007 Very strange, there should be a logical explanation but nothing comes to mind. Did you checked your backticks or if something is written wrong while using interpolation. |
export const authEndpoint = const redirectUri = "http://localhost:3000/" ; const clientId = "xxxxxxxx" ; const scopes = [ export const loginUrl = it's not working for me |
@Haoui-Hamza Did you put your url in backticks while using interpolation like: |
Ya thanks everyone! I have edited the redirect Uri after uploading to the firebase to get the link and then copied the link to the spotify redirected Uri and also then edited the redirected uri link in my code. Then, I have reuploaded it which made it running without and Problem! |
If you come around here with problems in connecting openhab: I added
as Redirect URI in Spotify Developer Dashboard and it worked perfect. |
you just need to look at the URI in https://developer.spotify.com/dashboard/ which you have added while editing the info of the URL it should be the same which you are passing as a parameter i |
This helped me so much thank you! |
My issue was forgetting a trailing slash in the request url. On spotify: Request Note the trailing slash in both places. |
I am getting the same issue guys, i have put the redirectUri as this
in the react app and i have put the same redirectUri in the dashboard of the spotify. I am encountering the same issue. Any idea what is going wrong. |
There is one mistake tha you did is that you gave space between the question mark and client_id, just remove it and the code will run perfectly fine |
I just encountered this error today as well. I was able to get around it by going into my dashboard, removing the uri, saving and then adding the uri back in and saving. I don't know why, but it seemed like the uri "expired" if that makes sense. |
If still the error occurs simply delete the Spotify app in the dashboard and recreate the new app with a new client id. |
please help us with the steps |
@vishwavrat2802 |
Another thing to check is the redirect_uri when you request code/token from Spotify must be the same as redirect_uri when you send code/token to Spotify. That's what helped me. |
This worked fine for me. Thank u so much!!! And in spotify: |
What worked for me was editing the settings on the spotify panel and adding the url: http://localhost:3000/callback/ |
My problem was, my URI was different for the call to get the "code", then it was from getting the "token". Just adding this to remind readers to double check such small variables. |
just make sure redirectURLs both are the same. worked for me thanks @patricksousamacedo |
this problem was available to me and I noticed that I accidentally registered in the dashboard the redirect to 'https://localhost:xxxx/callback', with https. It was my mistake, but it could be happening to someone else. |
After debugging this for a rather long time, I discovered that the |
What worked for me.
|
Hi, I'm currently going through the Spotify Web API tutorial. I have set up everything and then tried to run the application. I am able to get to Login Link, but then after I login I am redirected to a page with the error "INVALID_CLIENT: Invalid redirect URI". I have set up my application on My Dashboard and created the redirect URI: "http://spotifysentiment.com/callback/". However, after setting my redirect_uri to 'http://spotifysentiment.com/callback' in app.js I still get the same error. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: