I have had a spotify integration for some time, but it broke last week for some unknown reason.
As I had some changes in my spotify accounts in the meantime, I have recreated a new app in my new spotify account as per documentation (Spotify - Home Assistant) .
Unfortunately when adding the integration I get the infamous “INVALID_CLIENT: Invalid redirect URI” error.
The problem I have detected: the integration calls https://accounts.spotify.com/authorize?response_type=code&**client_id=867d427xxx**&redirect_uri=https://my.home-assistant.io/redirect/oauth&state=[state]&scope=[scope]
Where the client_id 867d427xxx is the client_id of my old application (that doesn’t exist anymore).
Changing the client_id manually in the URL gives me the next configuration step, but an error on confirmation (probably because the secrret key is not valid). I find no way to reset it… (properly removing the integrtion didn’t work)
I suppose that my old spotify credentials are still kept somewhere in a HA database, but where and how can I remove them?
There should be one, but it’s hidden by default. (thereby the dot at the start of the name)
In Linux, ls -a will display it.
If you are browsing through Windows explorer, you might need to activate the “Show > Hidden Items” option under “View”
Within the file /etc/home-assistant/.storage/application_credentials.
To list the directory use ls -la or ls -a as it is hidden by default by the dot-prefix.
Application Credentials can be managed by the following link (adjust to your HA prefix): http://homeassistant.local:8123/config/application_credentials.
You can also get there from the Settings \ Devices & Services menu, then click on the “3 dots” icon at the top right, then Application Credentials menu item.
From there, it’s simply a matter of checking the entries you want to remove, then click Remove Selected that will appear at the top right after something is selected.