Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!