librespot-java icon indicating copy to clipboard operation
librespot-java copied to clipboard

/v1/me/player/devices endpoint does not work through /web-api/

Open Twinki14 opened this issue 4 years ago • 0 comments

Describe the bug

  • /web-api/v1/me/player/devices returns an empty list of devices
  • Manually calling curl -X GET with a token returned from /token results in the same result, a 200 OK status 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 force query to /token/{scope}, and store forcefully generated tokens alongside their respective scope inside a unique key-value store in the token manager

Twinki14 avatar Sep 06 '21 22:09 Twinki14