Now playing
Spotify sign-in callback
GET
/api/nowplaying/spotify/callbackOpen. Open to everyone who can reach Tempolight.
Where Spotify sends the browser after signing in. Answers a small HTML page, not JSON (400 when it failed).
Query parameters
codestringFrom Spotify.
statestringFrom Spotify.
errorstringFrom Spotify, when signing in failed.
Responses
200OKtext/html
string
A small page saying whether it worked.
400Signing in failed: the same page, saying why.text/html
string
Request
curl 'http://localhost:8080/api/nowplaying/spotify/callback'const res = await fetch("http://localhost:8080/api/nowplaying/spotify/callback");
const data = await res.json();
console.log(data);import requests
res = requests.get(
"http://localhost:8080/api/nowplaying/spotify/callback",
)
print(res.json())