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

152
Vistas
How to retrieve google apps script library version number and note programmatically?

I want to get the Google apps script library details such as version number and note programmatically in a spreadsheet cell.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use the projects.versions.list method.

You need to specify the script ID of the library. If you have the link of the library you can find the script id in the url or in the project settings.

If they are not automatically added, you might have to add the scopes manually in the appsscript.json file. E.g. add this inside the brackets:

"oauthScopes": [
      "https://www.googleapis.com/auth/script.projects",
      "https://www.googleapis.com/auth/script.projects.readonly",
      "https://www.googleapis.com/auth/script.external_request"
    ],

Example:

function getVersion(){

    const AccessToken = ScriptApp.getOAuthToken();
    const scriptID = "scriptID" // put the script id of the library
    const url = "https://script.googleapis.com/v1/projects/" + scriptID + "/versions";

  options = {
    "method" : "GET",
    "muteHttpExceptions": true,
    "headers": {
      'Authorization': 'Bearer ' +  AccessToken
    }
  };

  response = UrlFetchApp.fetch(url,options);
  response = JSON.parse(response);
  allVersions = response.versions; //get all versions
  highestVersion = allVersions[0].versionNumber;
  console.log(response);
  console.log(highestVersion);
}
about 4 years ago · Juan Pablo Isaza 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