Spotify integration via UI aborted

No, the point of integrations is to integrate things into home assistant :slightly_smiling_face:

However, thatā€™s the direction HA is heading to, everything configurable through the frontend, but remeber, HA is still in beta state.

1 Like

Yes, youā€™re completely right there.

Still not working. Upon trying to integrate, ā€œopen websiteā€ to auth gives me 500 internal server error. id, token and URI are correct:

http://192.168.0.186:8123/auth/external/callback

Before 0.105 I had 2 Spotify accounts defined and working. With the new integration I was not able to make it work with 2 different accounts. Anyone who succeeded?

Hi folks,

looked through the docs, changed the redirect URI, but also no success with the new integration.
Now running on 105.5.

This is the redirect message from Spotify

https://accounts.spotify.com/authorize?response_type=code&client_id=my_clien_id&redirect_uri=https://myserver.duckdns.org/auth/external/callback

Still getting the INVALID_CLIENT: Invalid client

What to do next?

I know, itā€™s a pain with these noobs, but hey, itā€™s beta and Iā€™m learning more and more.

I like the idea of everything being configurable through frontend.
But I donā€™t know if I am newbie or something, but I hate when UI configurations hide the configuration file somewhere.
For instance, when you configure HACS using Integrations frontend, you put the API key in the form, but it is not written in configuration.yaml, is hidden.
Idk why, but I like to have access to these information, even when using UI configurations.

Well, I just followed these steps and got it up and running flawlessly.

This information should be visible in the directory .storage in the file core.config_entry.

1 Like

See, that confirms that Iā€™m newbie. Writing it down, I did not know about that!

No, Iā€™m sure there are a lot of experienced users who didnā€™t know that :wink:

Although it is a different platform now, it is still creating a media_player entity behind the scenes.

Iā€™ve followed the steps but still getting the same error. Any suggestion? Thanks

I had the same error. All configuration was correct.
It only works after I reboot the Home Assistant. Maybe it was a coincidence, but worked! :grin:

Good evening,
I wonder why it fails on my box. My redirect url on Spotify is defined as:
http://192.168.1.141:8123/auth/external/callback

yet the link is created as:

https://accounts.spotify.com/authorize?response_type=code&client_id=MyIDHERE&redirect_uri=http://192.168.1.141/auth/external/callback&state=MYSTATEHERE&scope=user-modify-playback-state,user-read-playback-state,user-read-private

you can see that my port 8123 gets swallowed and I end up with:

INVALID_CLIENT: Invalid redirect URI

What am I missing?

Thank you!

In my case, with new HA installs your HA it needs to be set in the menu - Configuration/General,
Scroll down and the internal/external addresses are set there

1 Like

Hey, I sort of have the same issue.
Not getting any logs or anything.

But Iā€™ve added the Client ID and Client Secret to my configuration.yaml, added my external URL and my internal IP address including ports (8123) to the spotify dashboard.
Just getting an instantaneous ā€œAbortedā€ when I try to add the integration.
Here is my system info:
arch armv7
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7l
python_version 3.8.5
supervisor 245
timezone Europe/Copenhagen
version 0.115.1
virtualenv false

Same here on my Home Assistant

Make sure your ip address is set in the config/general.

Weird, I do not have those in my settings menu.
Did some google search on it, and found that I can add it in my configuration.yaml.

homeassistant:
   external_url: ā€œhttps//YOUR.duckdns.orgā€  
   internal_url: ā€œhttps//YOUR.duckdns.orgā€

Add this bit, where you of course change URLs into the correct ones.
And now my Spotify Integration works!

Thank you @Danzal

3 Likes

Hi;
I have configured Spotify as media browser in HA 0.115.2
Works great, but how can I send the audio to any of my Google Home Mini? Is there any possibility to do that?
Thank you for your help!

EDIT:
I have solved it whit this