Search code examples
apioauthresponsespotify

Spotify API returns empty body


Im trying to work with the Spotify API, I went through the OAuth authentificaiton, token refresh & all. Everything seems in order. However, when I try to get actual data from any endpoint, I only get and empty-body response (content-length 0)

If I change any parameter to a wrong one (wrong URL, missing or erroneous access token) I do get the expected errors.

Actions like remote controlling (next/previous track) do work.

As far as I know I did request the appropriate scopes for the data I want to access.

Im a bit at loss about what to try as I get no errors and cant find any relevant information in the raw response.

A little more details if anything helps : - got an UserID, ClientID, ClientSecret, access token, refresh token - Spotify developer account is set up, redirect_uri works, OAuth works - Have a working Spotify user account, authorization has been granted from this account, music is playing from this account - Im on IPv6 behind domain name, but it seems the API can work with that just fine (at least during OAuth)

Any suggestion welcome.


Solution

  • Ok, mystery solved :

    I was using a POST request instead of a GET one.