spotify/web-api

GET request to the /player endpoint has unexpected return codes

Guptacos opened this issue · 0 comments

Issue found on May 28th, 2020

The documentation indicates that this call should return either a 200 or a 404 (unclear which is correct?), however it returns a 204.

Only relevant issue I could find was this, which was never followed up on.

Endpoint(s):

  • GET /v1/me/player/

Scope(s):

  • user-read-playback-state

Steps to reproduce:

Does not work in the API console, since it doesn't display error codes

  1. Make sure there are no active devices
  2. Use curl with verbose flag:
    curl -X "GET" "https://api.spotify.com/v1/me/player" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer __TOKEN__"
    
  3. Note the return code of 204

Expected behaviour:

UNKNOWN

Actual behaviour:

Return code 204 (consistently)