mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 16:45:52 +03:00
[GH-ISSUE #194] Authorization documentation changes #99
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#99
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 @kotutuloro on GitHub (May 30, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/194
It seems like Spotify has changed the authorization requirements for the API's endpoints.
All endpoints now require authorization, so things like searching and fetching tracks need an access token. The Spotipy docs has an example of a Non-Authorized request, but those no longer work.
@woutor commented on GitHub (May 31, 2017):
I succeeded searching for items using the Client Credentials Flow
@kotutuloro commented on GitHub (Jun 16, 2017):
Yup! I think Spotipy's docs should be changed to reflect that.
@fhopp commented on GitHub (Jul 14, 2017):
If you want the examples to work with updated authorisations, here's what you need to do:
1.) Get a CLIENT ID and CLIENT SECRET (https://developer.spotify.com/web-api/tutorial/)
2.) According to the Client Credentials Flow, modify the example scripts in the following manner:
Line 3: from spotipy.oauth2 import SpotifyClientCredentials
Line 4: client_credentials_manager = SpotifyClientCredentials(client_id='YOUR ID', client_secret='YOUR SECRET ID')
At the end of a script, modify the sp = spotipy.Spotify() to
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
Then it /should/ work.
@ritiek commented on GitHub (Jul 22, 2017):
First of all create an app on https://beta.developer.spotify.com/dashboard/ and note down your Client ID, Client Secret and Redirect URI.
To authorize your API calls without going through the headache of verifying the redirect URL. Just make use of the
oauth2method:Note that this method does not need any scope/redirect url and will only allow access to publicly available information.
To gain access to user's personal information, you need to use the old school
utilmethod (requires verifying of redirect URL):Learn more about using scopes from the official docs.
@JessicaMartini212887 commented on GitHub (Mar 22, 2018):
Thank you very much
@JeanPaiva42 commented on GitHub (Mar 8, 2019):
Damn, I'm late to the party but is there a way I can get the user private info without pasting the URL? I'm trying to buiild an app but this is killing me, lol.
@n-ivanov commented on GitHub (Apr 27, 2019):
@JeanPaiva42 There's a PR (#243) that handles this by using a local http server to listen to the redirect and get the access code. I took a similar approach in my application to handle this issue before noticing the PR and it works very well.
@aced125 commented on GitHub (Jun 9, 2019):
Thank you very much, this worked for me.