Google 工作表 API 的权限较少

Fewer permission for Google Sheets API

在我的 Chrome 分机的 manifest.json 中,我有这个条目:

"oauth2": {
    "client_id": "someLongIdHere.apps.googleusercontent.com",
    "scopes": ["https://www.googleapis.com/auth/spreadsheets"]
}

我在 background.js

中使用它
    chrome.identity.getAuthToken({ interactive: true }, getToken);

一切正常,但我需要进行扩展以请求更少的权限。这些权限可能会吓跑潜在用户:

特别是,我只想请求这些权限:

我的 google-fu 失败了,找不到如何将 Google API 限制为更少的权限

这些 scopes 可用于 Google 张 api

如果您想查看、编辑、创建表格,那么您需要其中之一

您的 google-fu 不会让您失望,只是别无选择。除非你只是在你的应用程序创建的文件之后,在这种情况下你应该检查 drive.file 一个。