user1654259
user1654259

Reputation: 11

Authorizing a Google apps script

Is it possible to make sure that users are not presented with an Authorize dialog when integrating a Google apps script on a google site? when the site is only exposed internally?

Upvotes: 1

Views: 5016

Answers (2)

Ferris
Ferris

Reputation: 21

As mentioned, there are two use cases primarily supported by Apps Script native Apps beans:

  • Execute as deploying user: end users don't need to authorize since accesses deployer's Apps resources
  • Execute as end user: end users need to authorize since accesses end user's Apps resources

The third use case you're describing is supported by the Apps Script's URLFetchApp running against the Google Apps APIs.

In many cases the Apps APIs can perform operations on behalf of the user which the authorized client (in this case Apps Script) has authority to perform, so if the client is authorized with admin credentials, the API can often perform operations on behalf of the end user without the end user having to authorize Apps Script to do so.

Unfortunately for your use case, the Gmail Inbox API doesn't appear to be one of those APIs. For monitoring other end-user inbox information, the Gmail Audit API may meet your needs.

Upvotes: 2

Srik
Srik

Reputation: 7957

If you set your app to execute as the 'user accessing the app', then it is not possible. However, if you set it to run as yourself, then only you have to re-authorize when you make any changes to code. The end users will not be asked to authorize

Upvotes: 0

Related Questions