首页 > 解决方案 > Google Sheets API - 从 google 登录迁移

问题描述

我正在关注https://developers.google.com/sheets/api/quickstart/js上的 Google Sheets API javascript 快速入门

他们似乎使用的是旧样式的 google 登录,并且文档似乎遵循已弃用的登录方法。

使用谷歌一键登录的合适方法是什么?似乎用户使用谷歌登录,然后我必须提供另一个谷歌登录按钮来启动 gapi 表格客户端?

更新:我得到的错误'gapi.client.sheets.spreadsheets.create(params);' 是:

create error: Request is missing required authentication credential. 
Expected OAuth 2 access token, login cookie or other valid authentication credential. 
See https://developers.google.com/identity/sign-in/web/devconsole-project

控制台中指定的 URL 以横幅消息“我们将停止使用 Google Sign-In JavaScript Platform Library for web”开头。

标签: google-apigoogle-one-tap

解决方案


推荐阅读