【问题标题】:Using Google Drive contents using Google Drive API without sending access tokens for each request使用 Google Drive API 使用 Google Drive 内容,而不为每个请求发送访问令牌
【发布时间】:2014-03-31 23:22:41
【问题描述】:

我正在编写一个可以修改 Google Drive 中的电子表格的应用程序,但问题是每次我尝试访问 Drive 内容时,它都会根据 OAuth2 规范要求访问令牌,我必须在浏览完之后手动生成以下链接:

  https://accounts.google.com/o/oauth2/auth?access_type=online&approval_prompt=auto&client_id=<THE_CLIENT_ID>&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/drive

任何人都知道是否可以通过 Drive API 或任何其他介质获取此令牌,客户端应用程序将采用 Java Swing 应用程序的形式,其中将有文本字段,插入这些字段的文本将作为一行添加到托管在 Google Drive 上的电子表格中。

谢谢

【问题讨论】:

    标签: swing security oauth-2.0 google-drive-api google-drive-realtime-api


    【解决方案1】:

    您第一次需要手动获取令牌,但之后您可以重复使用它。我猜这是重复的? Stored Credential from google api to be reused java

    must I click "Allow Acess" every time I connect? Google Drive SDK API

    [编辑] 抱歉,我没有看到日期。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-14
      • 2021-12-12
      • 2022-01-11
      • 1970-01-01
      相关资源
      最近更新 更多