class ScriptApp method .invalidateAuth()

ScriptApp is the Apps Script service.

.invalidateAuth() is the method name you will see after a dot in your code.

What it does

Clears stored authorization so the user must approve access again.

Why it's used

  • Force re-consent after you add new scopes.
  • Fix stuck auth during development or support.

Common errors

  • Forgetting parentheses on invalidateAuth. Write ScriptApp.invalidateAuth(), not ScriptApp.invalidateAuth or invalidateAuth by itself.
  • Skipping dots between chained calls. Each step needs a dot, like ScriptApp.invalidateAuth().
  • Adding spaces where they do not belong. Write ScriptApp.invalidateAuth(), not ScriptApp .invalidateAuth(), ScriptApp.invalidateAuth (), or ScriptApp . invalidateAuth().
  • Wrong capitalization. Use ScriptApp and invalidateAuth, not scriptapp or invalidateauth.

Explore

Related methods

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.invalidateAuth().

Browse the blog