我该如何解决? (标题)
在python shell中,我得到了
'raise SpotifyOauthError(response.reason) spotipy.oauth2.SpotifyOauthError:错误的请求'
代码将我重定向到一个网页,上面写着INVALID_CLIENT:无效的客户端。
我已将重定向URL添加到开发人员仪表板中的设置。请注意,仍然无法正常工作
def playSpotify():
username = 'gh8gflxedxmp4tv2he2gp92ev'
scope = 'playlist-read-private user-library-modify playlist-modify-public playlist-modify-private user-library-read user-modify-playback-state'
token = util.prompt_for_user_token(username, scope, client_id='e8c483b4795248d8a1d2565581773d8al', client_secret='0260ab662191470da382c6a9cb452340', redirect_uri='https://www.google.co.uk/')
if len(sys.argv) > 1:
username = sys.argv[1]
else:
print ("Usage: %s username" % (sys.argv[0],))
sys.exit()
if token:
sp = spotipy.Spotify(auth=token)
sp.start_playback(device_id=device_id, context_uri='spotify:playlist:4ndG2qFEFt1YYcHYt3krjv', uris=None, offset=None)