I have the same error as you Carlostico, what did you change your redirect too?
I can´t get it working.
Copy the url from the page the card is visible on and paste it into the spotify developer console
Is there a way to change the background to white or match HASS default theme ?
Unfortunately not as this card was originally written as a general html custom element that happens to be what home assistant fronted tech in lovelace uses.
Don’t know why but I am having a hard time authenticating with Spotify the problem seems to be the redirection page even thought I change to https://mypage.com/lovelace/media/ it stills redirects to https://mypage.com/lovelace/default_view any clue ?
this is the error
INVALID_CLIENT: Invalid redirect URI
have you added the URL of that page in the URI redirect in spotify developer dashboard as per the instructions?
usually http://HASS/lovelace/X
(where X is the number of the page you want this card to be on)
bummer - it seems Spotify removed the sonos devices from their web connectivity platform - you used to be able to play directly to Sonos from Spotify (thats annyoing )
raising a ticket with Spotify now to see what happens
EDIT: it seems spotify within my network shows the right list of devices, but your app doesnt appear to be running as if on my network.
Phone, PC apps in my network all show the sonos devices. Web version does not show the spotify devices
EDIT 2: I have changed all the redirect URIs to local, but it seems as its using the WebAPI its not able to see my sonos devices.
EDIT 3: booooo - Spotify API doesnt show the same sonos devices as the app
Is there anything that can be done locally to check for spotify connect devices?
Yes it worked with no problems!
Great. Then I’ll create a release a soon as I can.
Thanks for this card, loving it. I’m sure you get asked this a lot. But how can I set playback to shuffle?
Cheers
Isaac
Hi,
I’m trying to get the Spotify component working via HA cloud before trying this card, but get an
INVALID_CLIENT error when trying to link the Spotify account from HA.
In the Spotify Dashboard I have the Redirect URI as
https://yxos5-redacted-sod21.ui.nabu.casa/api/spotify
I have also set the above address (without /api/spotify) as the base_url in configuration.yaml (not sure if this is required with HA cloud).
If I type the URI as above into a web browser - I get the following error:
500 Internal Server Error
Server got itself in trouble
What am I doing wrong here?
You need to add the URL of the Lovelace view that is showing your Spotify card into the developer console at Spotify.
For example;
https://yxos5-redacted-sod21.ui.nabu.casa/lovelace/1
Or
https://yxos5-redacted-sod21.ui.nabu.casa/lovelace/spotify
These are just examples though and depend on what view you have the card.
Thanks Craig. Just got it sorted. I probably posted in the wrong place as I was first trying to get the standard HA Spotify integration working. My problem ended up being just an extra space before my ID.
Have also managed to get the Lovelace card working.
Hello,
I am encountering a problem with the spotify lovelace card in combination with Home Assistant cast.
The spotify lovelace card is working properly on my webpage which is great! Now i would also like it to function on my Google home hub (the screen version). Am able to cast my lovelace ui to the google home hub and i see the spotify card working. But the problem is that it gets stuck on the authentication. I can press authenticate but that will bring me to the login page from spotify. Pressing on the “login” field doesn’t bring up any keyboard which make me unable to authenticate.
Does anyone have any tips to make this work? Or is it possible to add something to the card which will allow me to use the card through home assistant cast.
Thanks in advance!
Thijmen
The authentication for this card requires that it is possible to redirect away and back from the HA URL. I don’t own a Google Home hub so I don’t know what it supports, especially together with HA…
For anyone that has had problems with chromecast I have released a new version of spotcast which fixes the issue with getting the token
Hi, I have Spotify Card 1.9 set up in my Home Assistant media tab (https://myhadomain.net:8123/lovelace/media
, installed via HACS and the raw ui editor) and have added that tab url to the redirect URI (this is in addition to https://myhadomain.net:8123/api/spotify
). Now the card works when I am in/opening the media tab on my browser, it occasionally re-authenticates with Spotify by accessing https://accounts.spotify.com/authorize?client_id=myclientid&redirect_uri=https://myhadomain.net:8123/lovelace/media&scope=playlist-read-private user-read-playback-state user-modify-playback-state&response_type=token
and successfully redirects back to the media tab.
My issue is sometimes after a while when I open the default HA tab https://myhadomain.net:8123/lovelace/default
, Spotify Card attempts to re-authenticate to https://accounts.spotify.com/authorize?client_id=myclientid&redirect_uri=https://myhadomain.net:8123/lovelace/default&scope=playlist-read-private user-read-playback-state user-modify-playback-state&response_type=token
. Since https://myhadomain.net:8123/lovelace/default
is not configured as a redirect URI Spotify returns a INVALID_CLIENT: Invalid redirect URI
error. I don’t know whether this is intended behavior to re-authenticated on any tab or if this is a misconfiguration on my part (is it required to add all of my tabs as a redirect URI?).
Thanks for any insight on this issue.
Hi
@fondberg I’m a bit lost what is the correct Redirect URI in spotify settings? It should be http://mydomain.no-ip.org:8123/api/spotify or http://mydomain.no-ip.org:8123/lovelace/1 (where this card is)?