este código me devuelve esto: {"error": "unsupported_grant_type", "error_description": "Tipo de concesión Ninguno no es compatible"}. ¿Qué estoy haciendo mal?
app.get('*', (req,res) => { res.sendFile(__dirname + "/test.html") console.log(req.query.code) const Body = { client_id: "870076989682360330", client_secret: "my secret", code: req.query.code, redirect_uri: "http://localhost:3000", grant_type: "authorization_code", scope :"scope" } if(req.query.code) { reqst.post({ uri: "https://discord.com/api/oauth2/token", headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: JSON.stringify(Body) }, (x,y,z) => { console.log(z) }) }})
¿Tiene alcances? si no, intente agregar ámbitos y, en caso afirmativo, puede verificar este token de acceso Discord Ouath2 'Tipo de concesión Ninguno no es compatible' y discord docs https://discord.com/developers/docs/topics/oauth2#authorization-code-grant