Spotify integration do not work

Hello all, I’m happy to join the home assistant community :grinning:

I followed the topic to link spotify but unsucceful.

Configuration file is in /config

Since I am in docker, I check the path and go to the “real” folder

Perfect so I modify this file :

With the required lines :
spotify:
id_client: xxx
id_secret: xxx

Go back to integration and select spotify :
Aborted :sob:

What is wrong ?

Thank you

Spotify is now an integration that you can add in the configuration page, have you tried that?

Also, your configuration.yaml, or even better it’s directory, should be mapped in docker so that you can edit it without needing to login to the container.

Thank you for your help :slight_smile:

The problem is that my server address is 192.168.1.59:8123 but when I try to integrate spotify it calls :

https://accounts.spotify.com/authorize?response_type=code&client_id=xxx&redirect_uri=[u]**http://10.8.3.30:8123**[/u]/auth/external/callback&state=xxx&scope=user-modify-playback-state,user-read-playback-state,user-read-private

Then I put 10.8.3.30 in spotify redirect url but the callback cannot find my server (because on my network this ip address doesn’t exist)

That’s a different problem then :slightly_smiling_face:

You can try to put in your public IP as the callback URL and the port, if that doesn’t work, you can also setup some sort of reverse proxy like nginx to handle the calls. In my case, HA is accessible at assistant.MYDOMAIN.com

This is exactly what I am trying to do with traefik (and cloudflare) but my server does not seem to accept request, “error 522”

Have you checked if your router is routing traffic like it should to your home server ?

I have a domain name on hostinger where I replace the DNS by cloudflare ones.
On cloudflare I set my ip address
In my router I redirect 80 and 443 to my server

And …

I had a similar issue and setting internal_url helped (also setting external_url might prevent future issues of this kind.)

homeassistant:
  internal_url: https://hassio.[mydomain]/

The reason: The Spotify component uses get_url() without prefere_external , so using the internal IP address, which defaults to the local (docker) IP if not set.

3 Likes