mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #101] analysis_url #48
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#48
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 @Snippern on GitHub (Jun 14, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/101
Hi!
I'm suddenly no longer able to access analysis_url and very curious to find out if I'm the only one experiencing this problem. I'm getting error status 401 with the message "No token provided". I'm using the prompt_for_user_token function to authenticate.
Thank you in advance!
-Snippern
@plamere commented on GitHub (Jun 14, 2016):
There was a change to the spotify API - you are now required to include
your auth token when you get the analysis url. This can be done easily with
the _get method like so:
from spotipy.oauth2 import SpotifyClientCredentials
import json
import spotipy
import time
import sys
client_credentials_manager = SpotifyClientCredentials()
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
sp.trace=False
if len(sys.argv) > 1:
artist_name = ' '.join(sys.argv[1:])
results = sp.search(q=artist_name, limit=50)
tids = []
for i, t in enumerate(results['tracks']['items']):
print(' ', i, t['name'])
tids.append(t['uri'])
On Tue, Jun 14, 2016 at 12:53 PM, Snippern notifications@github.com wrote:
@Snippern commented on GitHub (Jun 14, 2016):
Perfect! Thank you so much!