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

210
Vistas
"TypeError: OAuth2.createService no es una función" al intentar usar la biblioteca OAuth2

Intenté usar la biblioteca OAuth2: https://github.com/googleworkspace/apps-script-oauth2

Sin embargo, después de configurar mis variables, sigo obteniendo el servicio de creación que no es un error de función. Obtengo esto para todos los métodos de la biblioteca, como si no estuviera activado. ¿Algún consejo sobre lo que podría estar haciendo mal? ¡Gracias!

 function getToken() { // Create a new service with the given name. The name will be used when // persisting the authorized token, so ensure it is unique within the // scope of the property store. const scriptProperties = PropertiesService.getScriptProperties(); var client_id = scriptProperties.getProperty('CLIENT_ID'); var secret = scriptProperties.getProperty('SECRET'); var service = OAuth2.createService('Service') // Set the endpoint URLs, which are the same for all Google services. .setAuthorizationBaseUrl('X') .setTokenUrl('X') // Set the client ID and secret, from the Google Developers Console. .setClientId(client_id) .setClientSecret(secret) // Set the name of the callback function in the script referenced // above that should be invoked to complete the OAuth flow. .setCallbackFunction('authCallback') // Set the property store where authorized tokens should be persisted. .setPropertyStore(PropertiesService.getUserProperties()) // Set the scopes to request (space-separated for Google services). .setScope('CustomerAPI.Public') .setParm() Logger.log(service); }
about 4 years ago · Juan Pablo Isaza
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