Node.js google drive api - 未经同意屏幕授权 [英] Node.js google drive api - authorize without consent screen
问题描述
我很感兴趣这是否可以使用 Google Drive API 在 Node.js 应用程序中未经同意屏幕?
I'm interesting is this possible to use Google Drive API without consent screen in Node.js app?
- 我只想使用启用应用引擎的帐户.Api 必须拥有完全权限才能保存文件、共享文件、删除文件.
- 我的应用将部署到 heroku.
我从 Google Drive API 的 quickstart 获取示例,但我不知道该怎么做.
I'm get example from quickstart from Google Drive API, but I don't have idea how I can do this.
推荐答案
不要使用服务帐户.它不会做你认为它会做的事情.您需要的是为您的 Google 帐户存储的刷新令牌.我已经在 如何在没有用户干预的情况下授权应用程序(网络或已安装)?(规范?),包括将在节点下运行的示例 JavaScript.
Do not use a Service Account. It doesn't do what you think it does. What you need is a stored Refresh Token for your Google Account. I've set out all of the steps at How do I authorise an app (web or installed) without user intervention? (canonical ?) , including sample JavaScript which will run under node.
这篇关于Node.js google drive api - 未经同意屏幕授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!