0

Background: I'm the creator of PlantUML Gizmo, one of the first Google Docs add-ons. As such, it's a kind of legacy add-on, and I began the development long before there were today's processes of managing OAuth 2.0 scopes and consent (which are still evolving it seems). At one point I had to even migrate it to G Suite Marketplace, so I'm not entirely sure what the process of creating a new Add-on today would be like.

A few weeks ago I got an email from Google saying I must "Submit your apps’ sensitive scopes for OAuth API verification" before a certain date, which I'm trying to respect now.

Here is the list of scopes I see:

List of scopes for Google APIs

Two of them surprise me, namely email and profile. My add-on does not use these things directly, so I never (to the best of my knowledge) requested these scopes.

On the other hand, I remember that, in the early days, my add-on would request a permission of "Allow this application to run when you are not present" (see the list of permissions). The explanation I got from a Google employee (or on Google+ forums that are now dead) that it was due to OAuth tokens being refreshed when you're off line. I never explicitly do anything in my code to run when users are not present!

So my question is to know why email and/or profile scope are required in my add-on as it's configured. I can easily delete those scopes today, but I'm afraid to break some functionality.

Clicking on Learn more in the Scopes page takes me to a long list of APIs. I can find the email scope on this page and it says only:

https://www.googleapis.com/auth/userinfo.email View your email address

I didn't explicitly request that scope. How can I know if it's coming from an API call (e.g., saving preference data, etc.)? The same goes for the profile scope.

p.s. I have always found it frustrating as a user (developer) to know which features (API calls) require which permissions/scopes. I have always wanted transparency (and to provide it as a developer).

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
  • The scope required by each call is detailed in the Apps Script documentation. You could also manually set the scopes in your manifest file, execute your add-on, and see where it breaks – tehhowch Aug 31 '19 at 17:49
  • Following instructions on [this page](https://developers.google.com/apps-script/concepts/scopes), I find that the project scopes are 3 OAuth Scopes required by the script: https://www.googleapis.com/auth/documents.currentonly https://www.googleapis.com/auth/script.container.ui https://www.googleapis.com/auth/script.external_request -- no mention of profile or email. I guess I can remove those, at least from the GAS perspective. – Fuhrmanator Aug 31 '19 at 18:17

0 Answers0