Hi there! Right now I’m using IFTTT to add a song I like playing on the radio station on my Sonos to one of my Spotify Playlists, but since they started the paywall I try to stop using it. Another way would be to use curl commands, for example
curl -i -X POST "https://api.spotify.com/v1/playlists/XXX/tracks?uris=spotify%3Atrack%XXX,spotify%3Atrack%XXX" -H "Authorization: Bearer {your access token}" -H "Accept: application/json"
But for this I need the OAuth Token. In some forum posts, I found out its located here (from the Spotify integration)
/home/homeassistant/.homeassistant/.spotify-token-cache
But I can´t find this path in Hassio. I tried
- platform: command_line
name: "Spotify Token"
command: "cat /home/homeassistant/.homeassistant/.spotify-token-cache | cut -d \" -f 4 | cut -d \" -f 5"
or
- platform: command_line
name: "Spotify Token"
command: "cat /config/.spotify-token-cache | cut -d \" -f 4 | cut -d \" -f 5"
but without success. Is there maybe another way to get this OAuth Token?