I am trying to recreate an oauth authentication connection in MeteorJS. I got to the request for access and update tokens, but now I get the 415 error all the time. Here is the corresponding code:
var results = HTTP.post( 'https://accounts.spotify.com/api/token', { data: { code: code, redirect_uri: redirectURI, grant_type: 'authorization_code', client_id: clientID, client_secret: clientSecret }, headers: { 'Content-Type':'application/json' } } );
I can't seem to find any other good documentation about the problem and the code in this demo:
https://github.com/spotify/web-api-auth-examples/tree/master/authorization_code
works great.
Pete.Mertz
source share