spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
983 stars 79 forks source link

Error code 400 bad request Authorization Code Flow #1521

Open gustavlindstroms opened 4 years ago

gustavlindstroms commented 4 years ago

Title: Error code 400 bad request Authorization Code Flow

Issue found on April 4th 2020.

Endpoint(s):

Scope(s):

Steps to reproduce:

  1. Write axios post request to https://accounts.spotify.com/api/token with up to date code and correct redirect uri. And include client_id and client secret in the url query. Not as a hashed header.
  2. Run the request

Expected behaviour:

I should by then get a json file containing token, refresh token etc.

Actual behaviour:

400 Server Error (consistently) response payload: {"error":"server_error"} Information of the request in brower. image The axios request code: image

More info about the request: image

gustavlindstroms commented 4 years ago

It's probably not a bug . I can be just doing something wrong, but who knows?

Tack på förhand, Gustav

gustavlindstroms commented 4 years ago

Investigated further. When switching to Jquery, Ajax. I still get an error but the API returns me a DOM instead.

image

ramibarnat commented 4 years ago

I've been getting a similar issue with sending the initial request for the authorization code. I wasn't even able to get to this part.