I developed a Google Sheets addon (sidebar), and now trying to put it to the Google Workspace Marketplace.
I'm a little lost with the OAuth scopes needed to be set as part of the user consent screen and/or app configuration screen (and/or other places?).
I got few questions:
1. What are the scopes I actually need to set
This is what add on do:
Reads all data in the spreadsheet, basically read access, to analyze references between formulas cells (Dependents and Precedents)
upon user approval (clicking a button each time) it will write results to a new sheet in the current worksheet.
In the case of internal error and upon user approval (clicking a button each time), addon sends email with the error details including stack trace and potentially additional parameters (spreadsheet and sheet(s) names.
logs are written during running for the purpose of debugging and flow improvements. Logs records might include some of the spreadsheet underlying data
I couldn't find any full list of scopes, but my understanding is I need at least:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/spreadsheets
2. Where scopes should be configured
I found at least 3 places holding scopes settings.
In the OAuth consent screen setup in the Google Cloud Platform console (
API & Services -> OAuth consent screen
)#3 in the how to publish guide leads to the App Configuration screen in the Google Workspace marketplace SDK settings (see screenshot)
I couldn't find the way to reach this page accept as described (search for Google Workspace marketplace SDK in the console). Seems it is hidden somehow...don't really understand. This screen also have oAuth scope settings.
appscript.json
file as described here. currently appscript.json doesn't have any scope references.