-
Notifications
You must be signed in to change notification settings - Fork 2k
I m trying to Impersonating users from admin in Calendar #1452
Copy link
Copy link
Closed
Labels
needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Hi,
I m trying to Impersonating users from admin in Calendar, i provided all required access to this resource still i m getting 404 Not found error unless sharing calendar to specific person option from the user side. Can any give me example or solution to solve this issue.
const { google } = require('googleapis');
const calendar = google.calendar('v3');
const key = require('./gsuite.json');
const CALENDAR_ID = 'xxxx@example.com';
const jwtClient = new google.auth.JWT(
key.client_email,
null,
key.private_key,
['https://www.googleapis.com/auth/admin.directory.user','https://www.googleapis.com/auth/calendar'],
key.client_email
);
jwtClient.authorize(function (err, tokens) {
if (err) {
console.log(err);
return;
}
});
// Make an authorized request to list Calendar events.
calendar.events.list({
auth: jwtClient,
calendarId: CALENDAR_ID
}, function (err, resp) {
console.log(err)
res.send(resp.data);
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.