【问题标题】:Unable to authorize to Google Sheets v4 API from web app using javascript无法使用 javascript 从 Web 应用程序授权 Google Sheets v4 API
【发布时间】:2017-01-22 11:48:11
【问题描述】:

当使用 v4 API 的 quickstart 在我的 localhost:8080 上运行 Web 应用程序时,我能够读取和写入数据到谷歌表。

当我在外部 tomcat 服务器上部署应用程序时,加载时似乎没有发生授权

<script src="https://apis.google.com/js/client.js?onload=checkAuth">

我正在http://10.200.99.110:8080/MyApp 运行应用程序。在 API 管理器凭据中,我输入了 'Web Application' 和 Javascript origin uris' 作为

http://localhost:8080    
http://10.200.99.110:8080

我是 OAuth 的初学者,如果能帮助我使其正常工作,我将不胜感激。

【问题讨论】:

    标签: google-sheets google-spreadsheet-api google-oauth google-sheets-api


    【解决方案1】:

    显然tomcat出现了一些问题,我在部署了一个新的war文件后从tomcat管理器中重新加载了它并且它工作了。

    另外,我注意到在 Google API 凭据管理器中修改 javascript 原始 uris 需要几分钟才能反映在应用程序中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-09-08
      • 2017-05-16
      • 2017-10-17
      • 2020-02-22
      • 1970-01-01
      • 2016-10-13
      • 2018-11-08
      相关资源
      最近更新 更多