Hello,
I am trying to get access_token to make API calls on behalf of users into monday account. ( Following: OAuth and Permissions). I have got the auth_code but when I request access_token using (code, client_id, client_secret) I get cors error. CORS issue is from server side so what might be the issue? Here is my request sample code:
const details = {
code: params.code,
client_id: CLIENT_ID,
client_secret: CLIENT_SECRET
}
fetch(TOKEN_ENDPOINT, {
method:'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: details
}).then(async(res) => {
const data = await res.json();
console.log("Data==>",data);
}).catch(err => console.log("Err==>",err))
Please have a look. waiting for the response.
Thanks!