Returns what permissions the script has been granted.
class ScriptApp method .getAuthorizationInfo()
ScriptApp is the Apps Script service.
.getAuthorizationInfo() is the method name you will see after a dot in your code.
What it does
Why it's used
- See which scopes the user still needs to approve.
- Build a setup screen that explains missing permissions.
Common errors
- Forgetting parentheses on getAuthorizationInfo. Write ScriptApp.getAuthorizationInfo(), not ScriptApp.getAuthorizationInfo or getAuthorizationInfo by itself.
- Skipping dots between chained calls. Each step needs a dot, like ScriptApp.getAuthorizationInfo().
- Adding spaces where they do not belong. Write ScriptApp.getAuthorizationInfo(), not ScriptApp .getAuthorizationInfo(), ScriptApp.getAuthorizationInfo (), or ScriptApp . getAuthorizationInfo().
- Wrong capitalization. Use ScriptApp and getAuthorizationInfo, not scriptapp or getauthorizationinfo.
Explore
Related methods
-
.invalidateAuth()
Clears stored authorization so the user must approve access again.
-
.getScriptId()
Returns the unique ID of the current script project.
-
.getOAuthToken()
Returns an OAuth token for calling Google APIs as the user.
-
.getProjectTriggers()
Returns all triggers set up in the script project.
-
.getService()
Returns a connected advanced Google service, like BigQuery or YouTube.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about ScriptApp.getAuthorizationInfo().