Poo*_*lve 2 google-api google-apps-script google-drive-api google-oauth
对于使用 Google Apps Script 创建的应用程序之一,一些范围会自动添加到我的应用程序中,如下所示:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/script.external_request
https://www.googleapis.com/auth/script.send_mail
https://www.googleapis.com/auth/spreadsheets
我已根据此文档遵循 OAuth 客户端验证的所有步骤。但是,我的验证过程仍在等待中,支持团队说我需要将https://www.googleapis.com/auth/drive.file范围添加到我的项目中。
任何人都知道如何在现有项目中添加/启用https://www.googleapis.com/auth/drive.file范围。
当您对应用程序进行身份验证时,您应该请求额外的范围
例子
{
...
"oauthScopes": [
" https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/userinfo.email"
],
}
Run Code Online (Sandbox Code Playgroud)
检查文档here
| 归档时间: |
|
| 查看次数: |
3221 次 |
| 最近记录: |