我使用 JWT 令牌作为服务帐户的身份验证如果我在活动中添加参与者,我会收到上述错误,我将其作为服务开发,所以我可以在不使用 oauth2 授权的情况下解决这个问题吗?
const scopes = ['https://www.googleapis.com/auth/calendar', 'https://www.googleapis.com/auth/gmail.send']
const calendar = google.calendar({ version: "v3" });
let rawdata = fs.readFileSync('googleCalendar\\calendarcred.json');
let CREDENTIALS = JSON.parse(rawdata);
let auth = new google.auth.JWT(
CREDENTIALS.client_email,
null,
CREDENTIALS.private_key,
scopes
);