mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 08:35:49 +03:00
[GH-ISSUE #247] Redirect URI Confusion #130
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#130
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 @MoeMixMC on GitHub (Feb 1, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/247
I'm having issues with authentication (I know, pretty basic haha). But here's my code:
`import spotipy
import spotipy.util as util
sp = spotipy.Spotify()
scope = 'user-library-read'
util.prompt_for_user_token("my_username",scope,client_id='client_id',client_secret='client_secret',redirect_uri='python-spotify-test-app://callback')
results = sp.search(q='weezer', limit=20)
for i, t in enumerate(results['tracks']['items']):
print(' ', i, t['name'])`
As you can see I am passing in the parameters in the right order for the util#prompt_for_user_token method. However, I'm using a fake redirect URI (doesn't point to anything) and when I get prompted to enter the URL after running this code I get a Bad Request error. I'm making sure that what I input is EXACTLY the same as what I set the redirect url to be...
I know this question might be dumb but what should I put for the redirect uri? Thanks
EDIT: Fixed it... apparently, I forgot to add a slash at the end of my redirect uri.... lol