[GH-ISSUE #2] Authentication Error. INVALID_CLIENT: Invalid redirect URI #2

Closed
opened 2026-02-28 14:46:16 +03:00 by kerem · 9 comments
Owner

Originally created by @alichtman on GitHub (Sep 16, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/2

I have followed the instructions in the README and created the file in ~/.config/spotify-tui/client.yml with the correct credentials, and it's being read correctly.

Here is the request being made with important parts removed:

$ spotify-tui
Opened https://accounts.spotify.com/authorize?scope=user-modify-playback-state%20user-read-playback-state%20user-read-private%20user-read-currently-playing%20playlist-read-private%20user-library-read%20user-read-recently-played&client_id=CLIENT_ID&redirect_uri=http:%2F%2Flocalhost:8888%2Fcallback&response_type=code&state=xvlgXiO7MBaweLQ6& in your browser
Enter the URL you were redirected to: 

Here's the error page I get:

image

I'm noticing that the secret isn't included in the request. Should it be?

Originally created by @alichtman on GitHub (Sep 16, 2019). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/2 I have followed the instructions in the README and created the file in `~/.config/spotify-tui/client.yml` with the correct credentials, and it's being read correctly. Here is the request being made with important parts removed: ``` $ spotify-tui Opened https://accounts.spotify.com/authorize?scope=user-modify-playback-state%20user-read-playback-state%20user-read-private%20user-read-currently-playing%20playlist-read-private%20user-library-read%20user-read-recently-played&client_id=CLIENT_ID&redirect_uri=http:%2F%2Flocalhost:8888%2Fcallback&response_type=code&state=xvlgXiO7MBaweLQ6& in your browser Enter the URL you were redirected to: ``` Here's the error page I get: <img width="588" alt="image" src="https://user-images.githubusercontent.com/20600565/64984378-05db6f00-d8c3-11e9-9f27-8f9d9bc19aca.png"> I'm noticing that the secret isn't included in the request. Should it be?
kerem closed this issue 2026-02-28 14:46:17 +03:00
Author
Owner

@Rigellute commented on GitHub (Sep 17, 2019):

Ah sorry, there is an extra step I hadn't documented yet.

Go to your application you created in spotify -> click "Edit settings" and add http://localhost:8888/callback to the Redirect URIs

Screenshot 2019-09-17 at 09 31 15

Attempt auth once again.

<!-- gh-comment-id:532120073 --> @Rigellute commented on GitHub (Sep 17, 2019): Ah sorry, there is an extra step I hadn't documented yet. Go to your application you created in spotify -> click "Edit settings" and add `http://localhost:8888/callback` to the `Redirect URIs` <img width="603" alt="Screenshot 2019-09-17 at 09 31 15" src="https://user-images.githubusercontent.com/12150276/65025104-fd6c4e00-d92d-11e9-9604-17794e579a1b.png"> Attempt auth once again.
Author
Owner

@alichtman commented on GitHub (Sep 17, 2019):

That worked for me. Thanks!

<!-- gh-comment-id:532180412 --> @alichtman commented on GitHub (Sep 17, 2019): That worked for me. Thanks!
Author
Owner

@skull-squadron commented on GitHub (Oct 8, 2019):

Ran into this.

<!-- gh-comment-id:539469586 --> @skull-squadron commented on GitHub (Oct 8, 2019): Ran into this.
Author
Owner

@Pi-George commented on GitHub (Feb 25, 2020):

Can you please add this step to the setup instructions? This is still an issue

<!-- gh-comment-id:590770966 --> @Pi-George commented on GitHub (Feb 25, 2020): Can you please add this step to the setup instructions? This is still an issue
Author
Owner

@Rigellute commented on GitHub (Feb 25, 2020):

This step is documented in the README (steps 3 & 4)

<!-- gh-comment-id:590892666 --> @Rigellute commented on GitHub (Feb 25, 2020): This step is documented in the [README](https://github.com/Rigellute/spotify-tui#connecting-to-spotifys-api) (steps 3 & 4)
Author
Owner

@gmy77 commented on GitHub (Jan 14, 2022):

I have initially the same problem, only related to port... than i added but not i receive a page "Impossible to reach the page..."

<!-- gh-comment-id:1013106840 --> @gmy77 commented on GitHub (Jan 14, 2022): I have initially the same problem, only related to port... than i added but not i receive a page "Impossible to reach the page..."
Author
Owner

@gmy77 commented on GitHub (Jan 14, 2022):

I have initially the same problem, only related to port... than i added but now i receive a page "Impossible to reach the page..."

PS.... For an unknow reason... i tryed various times... now WORK...

Now perfetct.

<!-- gh-comment-id:1013108422 --> @gmy77 commented on GitHub (Jan 14, 2022): > I have initially the same problem, only related to port... than i added but now i receive a page "Impossible to reach the page..." PS.... For an unknow reason... i tryed various times... now WORK... Now perfetct.
Author
Owner

@Watskebuurd commented on GitHub (Aug 20, 2025):

sorry I have to reopen this again but since 9th of April 2025 it is not allowed anymore to use the localhost. Does somebody knows a workaround for this?

<!-- gh-comment-id:3208289368 --> @Watskebuurd commented on GitHub (Aug 20, 2025): sorry I have to reopen this again but since 9th of April 2025 it is not allowed anymore to use the localhost. Does somebody knows a workaround for this?
Author
Owner

@sewnie commented on GitHub (Aug 20, 2025):

Spotify-tui has unfortunately been abandoned by the author, and since then, the Spotify API changed signficantly, breaking this project.

Please use spotify_player: https://github.com/aome510/spotify-player, which is more feature-packed and more convenient.

<!-- gh-comment-id:3208294363 --> @sewnie commented on GitHub (Aug 20, 2025): Spotify-tui has unfortunately been abandoned by the author, and since then, the Spotify API changed signficantly, breaking this project. Please use spotify_player: https://github.com/aome510/spotify-player, which is more feature-packed and more convenient.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#2
No description provided.