mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #105] Can't log in to spotify #47
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlexEshoo on GitHub (Jun 23, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/105
So maybe I'm missing something here, but when I run the example program and it gives me a link to visit, I get to a log in screen, but when I try to click log in, nothing happens. I can click the log in through facebook link and this logs me in but when I paste it as the redirected link in spotipy, it raises an exception:
Am I doing something wrong? I have my credentials set as environment variables and I'm using http://example.com/callback/ as my redirect uri
@AlexEshoo commented on GitHub (Jun 23, 2016):
I found out that its actually logging me in, but not redirecting anywhere. If I put in a bad password it tells me such. but when I put my real password in and click log in, not a thing happens. If I open up the web player in another tab I'm logged in.
@AntonioSerrano commented on GitHub (Jan 13, 2017):
Solved it. In order to run the Authorization Code Flow example code provided in the Spotipy's documentation correctly, I specified the redirect URI in line 13 of the example script when calling util.prompt_for_user_token, even when I have done this previously when setting environment variables:
token = util.prompt_for_user_token(username, scope, redirect_uri = 'https://example.com/callback/')Likewise, do not use https://www.google.com or similar web address as your redirect URI. Instead, try 'https://example.com/callback/' or 'http://localhost/' as suggested here. Do not forget that the redirected URL once you are logged in must have the word code included.
Cheers,
Antonio
@AlexEshoo commented on GitHub (Jan 13, 2017):
I've tried what you said, but when I use any of the redirect URIs you suggest the webpage I am brought to has the following message: "INVALID_CLIENT: Invalid redirect URI"
Needless to say, when I past the redirected url in the terminal window I get the same traceback as before.
@nplevitt commented on GitHub (Mar 3, 2017):
Hey @AlexEshoo, I don't know if you ever figured this out, but I just solved the same problem.
I found that you have to add your redirect URI that you either include in your bash profile or specify directly in the token prompt to your list of redirect URIs directly in the settings for your Spotify Dev App.
@MakonnenMak commented on GitHub (Dec 24, 2017):
@nplevitt So I have specified it within my bash , Spotify Dev App, and within my python file. I still get the invalid error, is it due to the fact that I'm using 'https://example.com/callback/' as my redirect uri?
@enriquejosepadilla commented on GitHub (Jan 21, 2018):
@AlexEshoo @mmako1
Have you guys been able to figure it out? Below is my code from the examples and i get INVALID_CLIENT: Invalid redirect URI
token = util.prompt_for_user_token(username, scope, client_id=defintions.SPOTIPY_CLIENT_ID, client_secret=defintions.SPOTIPY_CLIENT_SECRET, redirect_uri=defintions.SPOTIPY_REDIRECT_URI)@enriquejosepadilla commented on GitHub (Jan 21, 2018):
nevermind :) Had to whitelist it from spotify dashboard!
@MakonnenMak commented on GitHub (Jun 2, 2018):
Apologies for the extremely delayed response, I never received a notification for your comment. For future reference though, whitelisting it fixed it for me too.