librespot-java
librespot-java copied to clipboard
/v1/me/player/devices endpoint does not work through /web-api/
Describe the bug
-
/web-api/v1/me/player/devicesreturns an empty list of devices - Manually calling
curl -X GETwith a token returned from/tokenresults in the same result, a200 OKstatus response, but an empty list of devices
To Reproduce
- Send a GET request to
http://localhost:24879/web-api/v1/me/player/devices. - The response body will contain
{ "devices": [] }
Expected behavior
- The same response I get using the Spotify Web API console directly, with a generated token from the console for the needed scope Expected response:
{
"devices": [
{
"id": "8b55839bcaa2d9c287f56d50bdd44cf18bdc3b7d",
"is_active": false,
"is_private_session": false,
"is_restricted": false,
"name": "Desktop",
"type": "Computer",
"volume_percent": 100
}
]
}
Result response:
{
"devices": []
}
Version/Commit v1.6.1
Extra notes
- Some combinations of scopes cannot be used together in the Spotify Web API console, if all scopes are being used to generate one a single token, the Spotify endpoint could be rejecting it, but not explicitly.
- Perhaps add a
forcequery to/token/{scope}, and store forcefully generated tokens alongside their respective scope inside a unique key-value store in the token manager