Access to fetch at ‘https://api.monday.com/v2’ from origin ‘https://<OUR_WEBSITE_API_DOMAIN>.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
var API_TOKEN = ''
monday.get('sessionToken').then((res) => {
sessionToken = res.data;
API_TOKEN = sessionToken;
console.log('Session Token:', sessionToken);
});
const query = `query {
boards(ids: ${boardId}) {
columns(ids: "${columnId}") {
id
title
description
}
}
}`;
const response = await monday.api(query, { token: API_TOKEN });
const description = await response.data.boards[0].columns[0];