thanks, so i just add http://192.168.1.1:8123 into the redirect URLs and save
(Assuming that is my IP of my HAS instance)
Ive done this, but i still get same error
INVALID_CLIENT: Invalid redirect URI
thanks, so i just add http://192.168.1.1:8123 into the redirect URLs and save
(Assuming that is my IP of my HAS instance)
Ive done this, but i still get same error
INVALID_CLIENT: Invalid redirect URI
I added /lovelace/xx to the end. worked for me
xx is page/view number
You can solve this by exposing your HA installation to the internet. Dont forget to set the base_url in http section in configuration file.
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: https://your.domain
Got the above error when i comment it out. If I add the base url in http section, the spotify connection works like a charm.
Donāt do this. There is no need to expose a HA instance to the internet to get the Spotify integration working. In the Spotify developer settings, set the redirect URI as shown. It can be a local ip address. I just (re)setup Spotify last night using this setting and it works perfectly.
This is how I solved my issue too. In spotify api dashboard, i added:
https://xxxxxxx.duckdns.org/auth/external/callback
as a redirect uri
This worked for me tooā¦ Logged into Spotify dev account and added https://xxx.duckdns.org
Donāt add the port to the end.
I have the same problem.
I use hassio behind ngnix, so I donāt use HTTP Integration in configuration.yaml.
Into spotify Redirect URI i have set https://XXXX.duckdns.org/auth/external/callback
I try with Ip address too.
youāre probably missing the home-assistant port in the end
eg: http://xxx.xxx.xxx.xxx:8123/auth/external/callback
Finally sorted it out ā¦
Using DuckDNS
Redirect URI should be:
https://<your_sub_domain>.duckdns.org:8123/auth/external/callback
Anyone having this issue,
If you click on the authenticate and get the error āinvalid-client-invalid-redirect-uriā
if you look at the address bar you will see the address that needs to go in the Redirect URIs
Mine was āhttp://192.168.xx.xx:8123/lovelace/haā
Thanks
Here solved adding this to the URI in Spotify account:
http://homeassistant.local:8123/auth/external/callback
Is this old documentation? Where does it say you have to input this with /api/spotify and WHERE? In the config.yaml? or on the spotify side? This makes no sense.
FIXED!!! For everyone getting bad URI redirects, etc, this is what I just did after reading all of the articles on this.
First off - the main issue I found was that in my config.yaml, under homeassistant, I had the internal URL with an extension of /lovelace/standard/blah blah, instead of JUST http://myHAip:port/ Thatās it!
Then for my spotify dev URI, follow the instructions and do http://localHAip:8123/auth/external/callback
Then the āconfigureā button actually works and authās your account.
This is what worked for me. I have HA exposed via duckdns (ie. https://xxxx.duckdns.org), and when I used the externally visible URL it did not work. However, using the internal URL did (ie. http://192.168.0.66:8123/auth/external/callback).
Fixed the problem after noticing the āinternal_urlā setting in configuration.yaml incorrectly was set to āhttpsā rather that āhttpā. Changing it to āhttpā and keeping the redirect uri in spotify pointing to āā¦auth/external/callbackā fix it for me!
Another try to give you a hint how to solve it:
Look at the URL of the ERRORā¦ mine looks like this:
https://accounts.spotify.com/authorize?client_id=xxx&response_type=code&redirect_uri=https://xxx.duckdns.org:8123/api/hassio_ingress/xxxx/spotify-credentials/auth/callback&state=4exxxn&show_dialog=true&scope=
Therefore the redirect url is:
https://xxx.duckdns.org:8123/api/hassio_ingress/xxxx/spotify-credentials/auth/callback
Which works fine for me (even when I donāt know why the system takes this choiseā¦).
What did it for me is using http://homeassistant.local:8123/auth/external/callback instead of the IP addressā¦Now letās see if the āunavailableā messages stay away.