mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #230] Bad Request when trying to get Authorized #120
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#120
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 @gawaineo on GitHub (Nov 9, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/230
This happens when I use the
util.prompt_for_user_token()function with client_id, client_secret etc and then try to paste the redirect URL with the code into the terminal.@Hurstwood commented on GitHub (Nov 14, 2017):
The typo in the documentation might be tripping you up. Look at my post #232 - it might help you.
@Loewkie commented on GitHub (Dec 21, 2017):
I'm also having this issue:
I have checked a trillion times to make sure that the redirect_uri is exactly the same in my code and in my whitelisted uri's. When it wasn't in my whitelisted uri's yet I got Invalid URI, now I'm getting Illegal URI
@ritiek commented on GitHub (Dec 22, 2017):
@Loewkie Notice the order of parameters in
util.prompt_for_user_token():github.com/plamere/spotipy@4c2c1d763a/spotipy/util.py (L9-L10)In your example, you are providing client_id instead of scope and so on..
You should use something like:
If you're not familiar with scopes, check out these official docs.
For example, if you want read access to your private playlists. Your scope should be:
Note: You can gain additional information using scopes only for the user whose client_id and client_secret you used.
@Loewkie commented on GitHub (Dec 22, 2017):
OK that solved it for me at least. Thank you. Silly that it was something this simple really.
@seeess1 commented on GitHub (Nov 7, 2020):
I'm having related problems. Just trying to get off the ground with Spotipy by retrieving data from my personal account but running into authentication errors. Following this example and setting environmental variables for the client ID, secret, and redirect URI but getting this error:
"OSError: [Errno 48] Address already in use"
I'm currently using "http://localhost:8888/callback/" as my redirect URI. Not sure if that might be causing problems.
Any ideas here?
@dpnem commented on GitHub (Nov 8, 2020):
I switched to using "http://www.google.com/" which solved that particular issue for me.
@Peter-Schorn commented on GitHub (Nov 10, 2020):
@seeess1 "OSError: [Errno 48] Address already in use" means that there is another process already using port 8888. You need to find it and kill it. Alternatively, use a different port. See https://stackoverflow.com/a/39557155/12394554
@seeess1 commented on GitHub (Nov 10, 2020):
Thank you very much for the reply. An alternative suggestion was given to me, which was to essentially ignore the error messages that appear in the browser, copy the URL that appears, and paste that URL into the cell in my Jupyter Notebook. That worked and I'm now able to retrieve my personal data from the API. Not sure if that's how it's supposed to work but it did nonetheless.
@Peter-Schorn commented on GitHub (Nov 10, 2020):
Yes, you can ignore the actual content of the page that you are redirected to. All that matters is the URL itself. If you look at the query string of the URL, you will see a
codeparameter. That's what spotipy needs to complete the authorization process.@seeess1 commented on GitHub (Nov 10, 2020):
Awesome thank you. Much appreciated.