Change token recovery request from get to post
continuous-integration/drone/push Build is passing Details

main
Félix MIELCAREK 11 months ago
parent 90a5c79a82
commit 281b29e1c1

@ -32,8 +32,12 @@ app.post('/', async (req, res) => {
const code = req.query.code;
const authOptions = {
url: 'https://accounts.spotify.com/api/token', method: 'get', json: true,
data: { code: code, redirect_uri: redirectUri, grant_type: 'authorization_code' },
url: 'https://accounts.spotify.com/api/token', method: 'post', json: true,
data: {
code: code,
redirect_uri: redirectUri,
grant_type: 'authorization_code'
},
headers: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic ' + (new Buffer.from(clientId + ':' + clientSecret).toString('base64'))

Loading…
Cancel
Save