Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda