Now playing
Disconnect Spotify
DEL
/api/nowplaying/spotifyAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Forgets the Spotify sign-in.
Responses
200OKapplication/json
enabledbooleansupportedbooleanplatformstringstatestringOne of
"ok" "starting" "unavailable" "error" "off"messagestring | nullmethodstring | nullOne of
"osascript" "playerctl" "dbus-send" "powershell" nulltrackobject | null{source, app, device, title, artist, album, dur, pos, playing, posKnown, remembered, following}.
spotifyobject403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X DELETE 'http://localhost:8080/api/nowplaying/spotify'const res = await fetch("http://localhost:8080/api/nowplaying/spotify", {
method: "DELETE",
});
const data = await res.json();
console.log(data);import requests
res = requests.delete(
"http://localhost:8080/api/nowplaying/spotify",
)
print(res.json())Response
{
"enabled": true,
"supported": true,
"platform": "darwin",
"state": "ok",
"message": null,
"method": "osascript",
"track": null,
"spotify": {
"clientId": "",
"connected": false,
"error": null,
"redirectUri": "http://127.0.0.1:8080/api/nowplaying/spotify/callback"
}
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}