Skip to content

Instantly share code, notes, and snippets.

@AVakhrin
AVakhrin / submit.md
Created January 9, 2022 18:51 — forked from tanaikech/submit.md
Retrieving ClientId using Google Apps Script

Retrieving ClientId using Google Apps Script

This is a sample script for retrieving clientId using Google Apps Script.

var accessToken = ScriptApp.getOAuthToken();
var url = "https://www.googleapis.com/oauth2/v3/tokeninfo";
var params = {
  method: "post",
  headers: {"Authorization": "Bearer " + accessToken}
};