[GH-ISSUE #1049] Spotify Auth Failed #470

Open
opened 2026-02-28 14:49:21 +03:00 by kerem · 5 comments
Owner

Originally created by @EsharkyTheGreat on GitHub (Dec 3, 2022).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/1049

After entering the client id and client secret, the authentication url is opened in my browser and the redirected to localhost:8888/callback?code=something_here, however there it is unable to establish a connection and spt prints out Spotify Auth Failed

Originally created by @EsharkyTheGreat on GitHub (Dec 3, 2022). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/1049 After entering the client id and client secret, the authentication url is opened in my browser and the redirected to `localhost:8888/callback?code=something_here`, however there it is unable to establish a connection and spt prints out `Spotify Auth Failed`
Author
Owner

@pehlicd commented on GitHub (Dec 4, 2022):

Have you done this step 4 in Connecting to Spotify’s API doc? You must enter the url in your spotify app dashboard for once.

<!-- gh-comment-id:1336411201 --> @pehlicd commented on GitHub (Dec 4, 2022): Have you done this step **4** in `Connecting to Spotify’s API` [doc](https://github.com/Rigellute/spotify-tui#connecting-to-spotifys-api)? You must enter the url in your spotify app dashboard for once.
Author
Owner

@EsharkyTheGreat commented on GitHub (Dec 4, 2022):

Yes, I've added the url and as I said I get redirected to localhost after authentication, I even get the code parameter in the url I'm getting redirected to, but I get spotfiy auth failed after that

<!-- gh-comment-id:1336429136 --> @EsharkyTheGreat commented on GitHub (Dec 4, 2022): Yes, I've added the url and as I said I get redirected to localhost after authentication, I even get the code parameter in the url I'm getting redirected to, but I get spotfiy auth failed after that
Author
Owner

@pehlicd commented on GitHub (Dec 4, 2022):

Could you go to Spotify Dashboard and go to the app that you created earlier after that click to the Edit Settings button then check the Redirect URIs section? You should see http://localhost:8888/callback url if you don't see, add it and run spt.

<!-- gh-comment-id:1336439568 --> @pehlicd commented on GitHub (Dec 4, 2022): Could you go to [Spotify Dashboard](https://developer.spotify.com/dashboard/applications) and go to the app that you created earlier after that click to the **Edit Settings** button then check the **Redirect URIs** section? You should see `http://localhost:8888/callback` url if you don't see, add it and run `spt`.
Author
Owner

@EsharkyTheGreat commented on GitHub (Dec 4, 2022):

Yup, as I said already the url is present in the Refirect URIs section, and I also get redirected to localhost:8888/callback?code= just for a second then the spt binary throws auth failed.

(edit) From the code I see that the err message spotify auth failed is thrown when the code value recieved by the local webserver is used to get a accesstoken but it fails

<!-- gh-comment-id:1336441550 --> @EsharkyTheGreat commented on GitHub (Dec 4, 2022): Yup, as I said already the url is present in the Refirect URIs section, and I also get redirected to localhost:8888/callback?code=<something> just for a second then the spt binary throws auth failed. (edit) From the code I see that the err message `spotify auth failed` is thrown when the `code` value recieved by the local webserver is used to get a accesstoken but it fails
Author
Owner

@pehlicd commented on GitHub (Dec 4, 2022):

I guess it should only be http://localhost:8888/callback that url not the localhost:8888/callback?code=. You can also check the ${HOME}/.config/spotify-tui/client.yml file just to be sure that you have provided the true credentials.

<!-- gh-comment-id:1336442511 --> @pehlicd commented on GitHub (Dec 4, 2022): I guess it should only be `http://localhost:8888/callback` that url not the `localhost:8888/callback?code=`. You can also check the `${HOME}/.config/spotify-tui/client.yml` file just to be sure that you have provided the true credentials.
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#470
No description provided.