mistery Joseph
mistery Joseph

Reputation: 1

Error in Spotify. Something went wrong, please try again or check out our help area

I am currently developing an application in python and at the moment of authentication it sends me error.

import sys
import spotipy
import spotipy.util as util

scope = 'user-library-read'

if len(sys.argv) > 1:
    username = sys.argv[1]
else:
    print "Usage: %s username" % (sys.argv[0],)
    sys.exit()

token = util.prompt_for_user_token(username, scope)

if token:
    sp = spotipy.Spotify(auth=token)
    results = sp.current_user_saved_tracks()
    for item in results['items']:
        track = item['track']
        print track['name'] + ' - ' + track['artists'][0]['name']
else:
    print "Can't get token for", username

Spotify error

Upvotes: 0

Views: 2397

Answers (1)

scgough
scgough

Reputation: 5252

I would check the callback URL - make sure that it is set up in your application on the Spotify developer portal.

You need to have a valid URL there for Auth to work. Make sure you have a trailing / if your app uses that. Make sure http/https is set correctly depending on your environment setup.

For more info, you can follow this: https://developer.spotify.com/documentation/web-api/quick-start/

Upvotes: 0

Related Questions