CORS error on Oauth request

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!

1 Like

Hello @binod7 and welcome to the community!

For this specific issue, we might need to dig deeper into it and give this some following. Can you please send this to appsupport@monday.com so that our team can take a closer look into it?

Cheers,
Matias

To get rid of a CORS error, you can download a browser extension like CORS Unblock . The extension appends Access-Control-Allow-Origin to every HTTP response when it is enabled. It can also add custom Access-Control-Allow-Origin and Access-Control-Allow-Methods headers to the responses.

This may help you,
Rachel Gomez

getting the same error. How you resolved this issue ?

Hello @AartiKulkarni,

Please send an email to appsupport@monday.com so we can take this from there :slightly_smiling_face:

Cheers,
Matias

I have sent an email to appsupport@monday.com

1 Like