Spotify configuration error (INVALID_CLIENT: Failed to get client)

hmm version .106 installed on Feb 26 2020 seems to cause some problems with bot ring and spotify. Spotify was working before but stopped to do so, log indicates a platform setup, bit it is not im my config.
Ring eems to be working normal with the same error

## Log Details (ERROR)

Logger: homeassistant.components.media_player
Integration: Media player ([documentation](https://www.home-assistant.io/integrations/media_player), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+media_player%22))
First occured: 4:47:59 PM (1 occurences)
Last logged: 4:47:59 PM

The spotify platform for the media_player integration does not support platform setup. Please remove it from your config.

noticed that spotify integration changed, you have to change redirect urls in the sportify app aswell.

configuration.yaml

spotify:
  client_id: YOUR_CLIENT_ID
  client_secret: YOUR_CLIENT_SECRET

Spotify app
image

Hi All,

I’m still getting this issue.

INVALID_CLIENT: Failed to get client

As soon as i add the integration.

I’ve removed my code from the YAML and i’ve created a new app on the dashboard.

Any ideas?

2 Likes

I have he same issue as well. I upgraded to 2022.8, got the warning, removed the line from YAML. Tried installing Spotify app and got this as warning every time.
Steps I tried:

nothing seem to work and all result in the same error: INVALID_CLIENT: Failed to get client.

I have no clue where to look anymore. I run Home Assistant supervised through Docker on a Debian bullseye machine.

can anyone help?

same problem…

Had the same problem. Today I managed to solve it. I changed the instance spotify integration
url to my internal ip and port:

YESSSSS I found it…

in home assistant, go to Terminal (install if you don’t have it),

  • cd .. (go one folder back)
  • cd config
  • ls -a (you will see .storage in the list (with only ls you won’t see the hidden folders)
  • cd .storage/
  • ls and check if you see application_credentials
    • I opened it with nano application_credentials and there are spotify credentials (crtl x to get out)
  • cp application_credentials application_credentialsold (just to be sure you have them in case, you can skip this step if you are sure)
  • rm application_credentials
  • ls to check if the file is gone.
  • restart home assistant.
  • Add Spotify as described in Spotify - Home Assistant
  • if you go back to the file in .storage you will see a new file is created with your new credentials/codes.

I hope this helps for all of you.

26 Likes

Hi there, I have the same issue but I am not familiar with using Terminal. Could you please put the above instructions in newbie format? Thanks

2 Likes

There are instructions for installing terminal and ssh here:

Only difference is that home assistant changed some things/location. Go to settings, add-ons, add-ons store, look for terminal & ssh and install it. After install click open web-ui. Then follow the instructions I made already.

1 Like

Thank you so much my friend.

1 Like

Thanks, this worked for me :slight_smile:

1 Like

@Mijn.Handen, you’re a legend! many thanks my friend!!! I was going around in circles and you’re solution fixed the issue immediately.

1 Like

YESSS indeed. Works for me as well!

1 Like

This helped me very well, Thank you!

1 Like

This helped me to. Thanks man :slight_smile:

1 Like

you are the man!, wonderful, Thank you so much bro

1 Like

Hi guys

I was struggling with some Spotify integration problems (500, invalid client etc). In my case the fault was that my dockerized Home Assistant could not connect to DNS server.
Firstly check is DNS is a problem:

  1. Login to HA container - on my setup it was: sudo docker exec -it homeassistant /bin/bash
  2. Ping any domain ping google.com - if command is not responding with ping, you know that it is DNS problem.

Solution:
In my docker-compose file add DNS configuration

homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/raspberrypi3-homeassistant:stable"
    volumes:
      ...
    restart: unless-stopped
    dns:
        - 8.8.8.8
    privileged: true
    network_mode: host

I have picked google DNS 8.8.8.8, you can pick anything you like.

Then restart docker-compose, in my case it was:
sudo docker compose -f ./home-assistant.yml stop
sudo docker compose -f ./home-assistant.yml up -d

Proceed with official documentation. Then it worked form me, with local IP.

1 Like

Works fine, tks

2 Likes

I hope this is useful for people. I had my HA on docker on Debian (supervised) back then. Never had a issue with DNS like you had.
anyways… thanks for sharing this information.

Thank you very much

1 Like