I am trying to get user access token, i did created my own html page on the redirect url.
When i get the code i pass it to cloud code (Sashido/Parse) and i will call post from there, but i keep getting unsupported_grant_type.
I tested it on PostMan and everythings works perfectly, so i guess it’s something related to cloud and/or Sashido server.
I did a lot of try, the code i am going to show is not my first attempt.
Just a small note, i am a c++ programmer not really used to program in nodejs, so be friendly with me
let patreonCheck = { code: patreonCode, grant_type: 'authorization_code', client_id: 'MY_CLIENT', client_secret: 'MY_SECRET', redirect_uri: 'https://www.ds-studio-dev.com/checkUser.html' }; const patreonRequest = await fetch('https://www.patreon.com/api/oauth2/token', { method: 'POST', body: JSON.stringify(patreonCheck), headers: { 'Accept': '*/*', 'Content-Type': 'application/json', 'Connection': 'keep-alive', 'User-Agent': ua } });
Can you help me to understand what can i do to fix this issue?