WorryFree Computers   »   [go: up one dir, main page]

Skip to content

Latest commit

 

History

History

NoLibrary

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Connect to a Google API without this library

This sample demonstrates how to connect to a Google Search Console API, which is not available natively in Apps Script. The script's manifest file has been edited to include the additional scope that the API requires. When a user authorizes the script they will also be asked to approve that additional scope. We can then use the method ScriptApp.getOAuthToken() to access the OAuth2 access token the script has acquired and pass it in the Authorization header of a UrlFetchApp.fetch() call to the API.