mirror of
https://github.com/misiektoja/spotify_monitor.git
synced 2026-04-25 22:55:52 +03:00
[GH-ISSUE #33] In client mode, clienttoken POST looks very different than Spotify web client #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomballgithub on GitHub (Dec 26, 2025).
Original GitHub issue: https://github.com/misiektoja/spotify_monitor/issues/33
When doing POST to https://clienttoken.spotify.com/v1/clienttoken, I see this from the Spotify web client:
This is from spotify_monitor:
Although origin is different and referrer is missing, I am really focusing on the protobuf data showing up as binary rather than clear text. It looks purposeful in the code, so not sure if something has changed on the Spotify side and the code needs updating, or what. A major difference like this could be a clear indicator of a non-Spotify app using this API
@Thereallo1026 had noted that the format was as follows, which matches what I see the official client doing:
@misiektoja commented on GitHub (Dec 27, 2025):
Yes, this is expected because in
clientmode we are simulating Spotify desktop client behavior, not the Spotify web client. This accounts for the differences. It might be that something should be updated, but since it is a really tedious task, I would suggest we leave it for an update once it stops working.@tomballgithub commented on GitHub (Dec 27, 2025):
Got it. For future purposes, I'll just document some code I made for build_clienttoken_request_protobuf(), although some client data was hard-coded:
And then using json=body rather than data=body in spotify_get_client_token()
response = req.post(CLIENTTOKEN_URL, headers=headers, json=body, timeout=FUNCTION_TIMEOUT, verify=VERIFY_SSL)