Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

987
Vistas
Error: Service accounts cannot invite attendees without Domain-Wide Delegation of Authority

im using JWT token as authentication of a service account im getting the above mentioned error if i add attendees in the event, im developing this as a service so can i solve this without using an oauth2 authorization ?

  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
    );
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

In order to use a service account with Google calendar you need to set up Perform Google Workspace Domain-Wide Delegation of Authority to your gsuite account.

Once the workspace (Gsutie) admin has authorized the service account you will be able to run impersonation. Just remember to set the auth to the user on your domain which you want the service account to impersonate.

import { JWT } from "google-auth-library";

  const auth = (await google.auth.getClient({
    scopes: ["https://www.googleapis.com/auth/admin.directory.user"],
  })) as JWT;

  auth.subject = process.env.GOOGLE_ADMIN_EMAIL;

Alternately once the service account has been granted access to the domain i think you can also share the calendar with the service account and this should give it direct access to the calendar without needing to impersonate to a user on the domain. However i don't think it will send notification emails.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda