Spotify Auth via Node Red

Hello Brilliant people!

First, thank you for your time reading this :slight_smile:

Second - I have trouble authenticating my Spotify account via Node-Red. The error I receive is “INVALID_CLIENT: Invalid redirect URI”.
Here is the URI I put on the Spotify developer page “https://carmelor.duckdns.org:8123/spotify-credentials/auth/callback

I am generally trying to automate my Spotify to work by a trigger, but I always get some kind of error, I tried using the “Call Service” node but also failed on that front.

I hope that authing Spotify via Node-Red (though it is already integrated) will give me some more options.

Some information:

This is how I set up the authentication:

This is the error I receive:

Thank you very much for your help, if there is any more information I can supply I would be happy to do so!

P.S - How do I add multiple or all Scopes?

If I’m not mistaken the actual URL you put into it should be:
https://carmelor.duckdns.org/auth/external/callback

Or did you specifically make the HTTPS available at port 8123?
8123 is usually the standard http port for home assistant locally.
If you are using duckdns you usually have the standard SSL Port 443 and hence this does not need to be added in the URL anymore.

EDIT
Ok I just saw that you did indeed do that. Your URL seems to be correct for Spotify Dev Console. Next thing I was just checking my own Spotify Dev console and realized that I also added the local path: http://192.168.1.100:8123/spotify-credentials/auth/callback
Are you accessing NodeRed via Ingress?
I just tried adding a new Spotify OAuth via Ingress and realized that the URL get the Ingress stuff added to it. In this case, try directly opening the NodeRed WebInterface with :1880 or whatever port you selected.

EDIT 2
So just tried to add one on my own. This worked for me:

Add your local http://YOURIP:YOURPORT/spotify-credentials/auth/callback to the whitelisted redirect URIs.
Then open NodeRed from the same address: http://YOURIP:YOURPORT

If you want to add multiple scopes, just add them in the field like you did your previous one.

1 Like

Thank you very much for your help @AlmostSerious !

I will dig into this on the weekend - super helpful!