Spotify integration trouble

Hi
I have been trying to install Spotify integration, i have follow instruction and troubleshoot
but now luck, i always get “INVALID_CLIENT: Invalid client”
i have done spotify developers setup with my Redirect URIs
https://192.168.0.8:8123/auth/external/callback
http://homeassistant.local:8123/auth/external/callback

what else could try any tips?

thanks

As it says in the documentation, use Link to OAuth2 Authorize Callback – My Home Assistant

Screenshot 2025-02-03 160413

im not using my.home-assistant.io as the url for my server, but if i have to use it then im not sure how to change that

@Mcbain
You don’t have to change your Home Assistant url; you just need to specify the https://my.home-assistant.io/redirect/oauth entry in the Spotify Developer Application settings “Redirect URIs” entry. You need to specify the entry exactly as it is spelled, and without the ending slash. This is an internal url that Home Assistant uses to intercept the OAuth2 request redirect result.

Hope it helps!

Sorry same error… i dont understand it

@Mcbain
You might try going to the Application Credentials settings (under Settings \ Devices, click on 3 vertical dots menu in upper right and select Application Credentials) and see if it created any oauth2 application credentials related to spotify. If so, delete them.

You might also open the Spotify Web Player and logout of Spotify. That might at least force you into a logon screen the next time you try.

Can you supply a screen capture of your Spotify Developer Application settings? Just want to verify your Redirect URI’s are correct, and that you have the Web API option checked.

Hope it helps!

Hi
it works! :slight_smile:
thanks alot, can i buy you a coffee?

1 Like

@Mcbain
Not necessary on the coffee, glad I could help. I’ve received a lot of help on this forum, and I’m just paying it forward. Glad you got it resolved.

@Mcbain
I also added this to my SpotifyPlus Frequently Asked Questions list, as this has been asked a few times before.

If you’re interested in Spotify, check out the SpotifyPlus Integration; it can do everything that the HA Spotify integration can do, and it supports both Sonos and Google Chromecast devices (Spotcast not required). You can also use the same Spotify developer account Client ID / Secret that you created for the HA Spotify integration if you want. You can run them side-by-side to compare features too.

There is also a SpotifyPlus Card user-interface that contains a media player, and allows you to manage your Spotify favorites as well as search the Spotify catalog. You have to install the SpotifyPlus integration first though, and get it configured before you can use the SpotifyPlus Card.

1 Like

That is great, i will check it out.
But regarding chromecast devices, i got a samsung tablet that i use for Ha panel on my wall, i got Bluetooth speaker connected to it, i can i install some kind of chrome cast app on it so i can stream to the speaker, because it cant play anything from spotify,
Also can i maybe buy Ikea SYMFONISK speaker based on Sonos, and install SpotifyPlus intergration

Thanks

@Mcbain
Not sure if you can install a Chromecast app on the tablet, as I am an Apple / iPad kind of guy.

I have a Sonos Ikea Symfonisk and it works fine with SpotifyPlus it. There is some extra setup with it for Sonos devices, since they use a different authentication method. Check out this page for how to set that up with SpotifyPlus.

Extra setup is also required for Chromecast - check out this page for how to set that up with SpotifyPlus.

1 Like

I am really sorry to re-open this. But I am having this issue. I have specified the redirect uri as Link to OAuth2 Authorize Callback – My Home Assistant and checked the web API but this just will not work

always redirected to the INVALID_CLIENT: Invalid client page

Been banging my head with this for a while now! Please help!!

@theunky
Regarding the INVALID_CLIENT: Invalid client errors …

Check out this document in the SpotifyPlus integration FAQ wiki. It should also work for the Spotify integration.

I think this is the recommendation of the day :wink:

1 Like

@theunky
I see you deleted your post … did you get it figured out?

If not, how are you accessing Home Assistant? Are you using the local dns alias (e.g. http://homeassistant:8123) url when trying to setup the integration? or are you using a customized dns alias (e.g. https://yourdomainname:8123) url? I would use the local dns alias url for initial setup of the integration.

UPDATE:
Also ensure that you linking the correct url in the Link Account to Home Assistant step.

IMPORTANT - Note the hi-lited URL prefix value in the Figure 4e example (top of the page in the URL); this should match the Redirect URI value (e.g. https://my.home-assistant.io/redirect/oauth) that you entered for the Spotify Developer Application in Step 2b - Create Application. If it does NOT match, then you will need to modify the Spotify Developer Application settings and add it as an allowed Redirect URI value. Note that you can specify more than one Redirect URI value in the Spotify Developer Application settings. You can adjust the Spotify Developer Application settings after this step is complete if need be.

IMPORTANT - Note the Your Instance URL value in the Figure 4e example (toward the bottom); this should match the url that you use to access Home Assistant. You may need to adjust the http:// to https:// if you access your instance of Home Assistant via Secure Sockets Layer (SSL).

Figure 4e - Home Assistant Link Account Form

Can you supply a screen capture of your Spotify Developer Application settings? Just want to verify your Redirect URI’s are correct, and that you have the Web API option checked.

Hope it helps!