Hi,
I managed to authenticate spotify using the config in the config.yaml file, but I am struggling to authenticate when using Node Red ( node-red-contrib-spotify 0.1.2 ).
Can someone kindly guide me?
Hi,
I managed to authenticate spotify using the config in the config.yaml file, but I am struggling to authenticate when using Node Red ( node-red-contrib-spotify 0.1.2 ).
Can someone kindly guide me?
Same problem here, cant authenticate NR node, always INVALID_CLIENT: Invalid redirect URI
Tried all the combinations on the Developer dashboard, between ip/dns and http/https,
https://xxxxxx.duckdns.org:1880/spotify-credentials/auth/callback
http://192.168.1.4:1880/spotify-credentials/auth/callback
Thanks for the help!
Hi Guys @servido @mouthpiec I think Iāve solved it by adding to the Spotify Developer Dashboard > Edit Settings > Redirect URIs the ip of my HA in the callback http://HASSIOIP:1880/spotify-credentials/auth/callback
If you need any other info check this link https://flows.nodered.org/node/node-red-contrib-spotify
HI, longtime no reply. But I am trying to get this going in node-red. I do this:
And I have in the URI on spotify:
anything else I try is not workingā¦ If I go to that URL I get:
And clicking on āstart Authenticationā gives me:
Whats wrong? I have read everything on the forum and official site (https://flows.nodered.org/node/node-red-contrib-spotify) but seem to not find a solution.
Also not clear what these are for exactly: https://developer.spotify.com/documentation/general/guides/scopes/#streaming
same issue for me ā¦
What I ultimately would like to achieve is this:
Since an alexa is coupled to 1 alexa account and all of them are connected to mine I can play Spotify easy to them. But my wife and kids canāt with the family spotify. They just donāt see the alexas. And this is a widely known āerrorā.
I thought of making some players in my profile I would be able to kick playing by node red when saying āalexa turn on spot kidnameā (or something similar ) and then play a list via my profile on alexaā¦
maybee possible after correct integration in node red ? for the moment i donāt know how to configure it differently
No one can help?
i found that it seems to work
When you get this Invalid redirect URI page, copy the URL from that page
Open https://www.urldecoder.org/ and paste the URL in the top box and encode the URL
Copy the URL after the part ā¦&redirect_uri= and before the next & (e.g. &state=)
Enter this URI in your spotify app in the redirect URI
For homeassistant users, it could look something like this:
http://homeassistant.local:8123/api/hassio_ingress/bla-bla/spotify-credentials/auth/callback
Hope this may help others as well.
Found the solution here:
appreciate the answer.
i have tried all I could but still no luck.
I see in your links it points to ā8123ā port and not 1880 port. How is that correct if I use node red running on 1880?
What do you have in the "āscopesā field in node-red? And what should happen when I click āauthenticateā in node-red?
I get:
INVALID_CLIENT: Invalid client
update: remove the oauth and now working. I REALLY DONT KNOW WHAT IT WAS I DIDā¦
spotify.authorized
Ok, now the next thing.
How to proceed now to use thisā¦
you can find a flow example on google but for the moment i donāt use it ā¦
Hi, I am further. Can play, pause, can next, skip etc. And I can do a ātransferMyPlaybackā to another device (alexa) via the device id.
Only thing not wokring for me i how to find and how to select waht playlist to play thereā¦
Like this:
What should I put in the function node and how do I get a playlist id?
This does not work:
msg.params = [ {playlistId: "37i9dQZF1DWXmlLSKkfdAk"} ]; return msg;
and a lot of others also not
gives me:
{"_msgid":"2b1aaff.8d8e15","topic":"","payload":true,"params":[{"playlistId":"37i9dQZF1DWXmlLSKkfdAk"}],"error":"WebapiError: Bad Request"}
Iām having trouble finding examples, or getting the function node to supply the correct information for just simple things like specifying a playlist too.
Would you mind posting how you managed to do play pause, etc. and transfer my playback, please?
Edit: OK, I found another post with more examples: Spotify node-red interface
You an get the deviceids by sending a string of ātrueā to get my devices, then looking at the debug console.
Then as above, use a function node with:
msg.params = [
['85202189a6blablsca22818c7383'],
{ play: true }
];
return msg;
msg.params = [ "3XubkIrRsDkykhyRsr8" ]; return msg;
in the function node for āgetPlaylistā returns my playlist in an array, but doesnāt play that playlist.
The same works for getPlaylistTracks
You can find the Spotifyid of the playlist by clicking on the 3 dots next to your playlist, then share, then copy spotify URI
Edit: Ok, you need to use play, rather than getPlaylist, and put this in the function node replacing your playlist uri
msg.params = [ {context_uri: "spotify:playlist:3XubktkkgujSVzMRsr8"} ]; return msg;
For setShuffle you need:
msg.params = [ "true" ]; return msg;
where true is to turn on shuffle. Thatās probably enough edits for one post today. Hope it helps.
Thing is the device ids randomly change now and then and I do not know whyā¦
Thatās alarming, and certainly puts a spanner in the works of automation. What sort of device is changing device ID? So far Iāve only used my computer, and a bunch of Alexas, but they havenāt changed so farā¦ touch wood, but then again Iāve only just started using it.
The getmydevices node might be able to help with automation, but it will take someone with more nous than me to pass variables. Another option might be able to use Home Assistant itself, with Spotcastā¦despite the name, it isnāt just a chromecast thing, but can broadcast to Alexas, computers, et cetera
For me only alexas changeā¦ and no answer so farā¦
Thanks for this. It solved my problems with invalid URI but now I have another issue. After agreeing to the permissions all I get is ā401: Unauthorized.ā Anyone have an idea why?
My Spotify integration within HA is working without any issues, I just canāt seem to get this to work in Node Red.
What have you done yourself?