theres the correct hint at the new spotify-integration site: “check the Redirect URI in the address bar” - there you can always find the correct redirect-URI, which needed to be entered in the spotify app settings:
I do confirm that you do not need to have your installation to be avaialble from outside and in case you use local IP (which works), there must be port number after the IP address: http://192.168.1.nn:8123/auth/external/callback provided in the URI in Spotify Developer website. Once I have changed it it works fine !
I use duckdns to expose my HA instance so i was assuming i needed to use the duckdns address which was not the case. When you reach the page that says Invalid redirect URI, check the address bar for the redirect_uri that is trying to be authenticated. in my case, it was my localhost ip so i added that to the spotify configuration and that fixes my issue.
Pay attention, that there is no port nr in the URI. And thats bothering me…
I changed the URI in the Developer page at Spotify also without the port nr.
The integration process finished after that, but it does not yet function…
Any help please
I have the same problem can’t figure out what is causing the error.
When i take the url that is behind the string i get an 404
The url fired is not reponding able to access the /auth/external/ string … bug? http://xxxxxxxxxxxxx:8123/auth/external/callback&state=eyJ0...and so on…
I use a custom domain: https://home.something.com. I put the :443 into Spotify and the URL did not have the 443 when trying to setup. Removed the port from the URL in Spotify and all worked.
I’ve fixed the problem with the solution that’s posted up her, but then I run into another error. I get send back to my own IP and that gives me " 500 Internal Server Error
Server got itself in trouble"
Anyone ever had that?
ps: the correct local link is added to the spotify app, the id/secret is correct, the redirect URI is correct in the browser
So I seem to have figured it out after a bunch of searching. Here’s what I’ve done:
Setup the Spotify Dashboard.
Get Client ID and Secret and put them in NodeRED (+ your scopes) and press Start Authentication.
Most likely the INVALID_CLIENT page will come up so copy the URL and decode it.
Find the URL between redirect_uri=<link_here>&state (should look something like http://<your-ha-IP>:8123/api/hassio_ingress/<bunch-of-junk>/spotify-credentials/auth/callback)
In Spotify Dashboard edit your application and put that link as the Redirect URI
Press Start Authentication in NodeRED again it should bring you to the permissions page where you click AGREE
It will then probably open a page with 401: Unauthorized error. Select the URL and press Enter to open it again. (Don’t F5 as that doesn’t work)
You should now get spotify.authorized
After digging through the forums with different posts saying to put different redirect URIs into the URL or Spotify these are the steps that worked for me.
Nice writeup. I just want to add one thing that was my problem. It seems that even though it looked like Spotify was saving my details in my project I never got the green banner that said “saved” and I couldnt figure out why it wasn’t working. I went back to the projects page and I had been logged off. This time when I click saved a banner came up that said details saved or something. Just a heads up if someone else gets the same problem here.