cocobean
cocobean

Reputation: 97

Set redirect URL for Spotify API

I know there have been multiple questions regarding this issue... however, I'm not sure how to handle my case.

I am using spotipy to access the Spotify API. In my python notebook, I entered:

util.prompt_for_user_token('<user_id>',client_id='<client_id>',client_secret='<client_secret>',redirect_uri='localhost:3000/callback/')

On the spotify developer website, I have listed localhost:3000/callback/ as my redirect URL.

When I run the prompt, I am redirected to the spotify page where I would click 'okay' to authorize the account. However, each time I click the 'okay' button, nothing happens. Tried using a separate browser, tried restarting my computer... I'm not sure what to do.

Thank you!

Upvotes: 0

Views: 732

Answers (1)

arirawr
arirawr

Reputation: 1275

After being redirected, the library should prompt you to copy the URL you're redirected to and paste it back in your python notebook. It then grabs the access token from the URL and uses it to authenticate.

Upvotes: 1

Related Questions