spotify-tui icon indicating copy to clipboard operation
spotify-tui copied to clipboard

Fixed: failed Spotify’s API setup - Invalid client: Invalid URI

Open aleksanderwalczuk opened this issue 3 years ago • 4 comments

Hi there 👋

I got stucked during configuration process. I was basically copy-pasting the documentation, but it took me about 2 hours to pass the whitelisting tui's url. What I've noted is:

  • when I clicked the generated url to open it in the browser it was it was incomplete in the browsers tab, like cut in half. This was seen on Visual Studio Code integrated terminal on Mac OS 10.15, fixed when I've switched to different terminal emulator (iTerm2) it worked fine
  • other API data (client_id, client_secret) was fine
  • generated callback url contains the redirect_uri parameter pointing to http://localhost:8888

Solved by whitelisting both http://localhost:8888 and http://localhost:8888/, worked as a charm.

Hope it saves some of your time, gl

tui installed via brew on OSX 10.15.7

aleksanderwalczuk avatar Sep 15 '21 12:09 aleksanderwalczuk

Same issue here. When you say 'whitelist' – are you just adding them to /etc/hosts/?

benfrain avatar Sep 24 '21 09:09 benfrain

@benfrain you have to whitelist it on the Spotify WebAPI side:

  1. log into https://developer.spotify.com/dashboard/applications
  2. Create an App or pick existing
  3. Click Edit Settings button and find Redirect URIs
  4. Add whitelisted URIs below

aleksanderwalczuk avatar Sep 24 '21 12:09 aleksanderwalczuk

Thanks @aleksanderwalczuk up and running now 👍

benfrain avatar Sep 24 '21 13:09 benfrain

I had my http://"IP address":8888 instead of http://localhost:8888 🤦

Thanks! That did the trick! xD <3

hejtlo0p avatar Aug 08 '22 06:08 hejtlo0p