php - google sheets 将数据附加到 sheet api 返回 401 身份验证错误

标签 php google-sheets google-api google-oauth google-sheets-api

当我请求将数据附加到 google 工作表时,它返回 401 身份验证错误。 我已经尝试使用 oauth(访问 token )和 api key ,但它始终返回 401 身份验证错误

enter image description here

最佳答案

您发出的请求需要 Oauth2 身份验证。 key 参数用于添加 api key 。 API key 仅允许访问公共(public) API 数据。

您应该将 access_token= 与有效的 Google Oauth2 访问 token 一起使用。

关于php - google sheets 将数据附加到 sheet api 返回 401 身份验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46564506/

相关文章:

php - 在 CodeIgniter 中使用 ion auth 进行密码验证

php - 根据上下文对 MySQL 结果进行排序

google-analytics - 在 Google Analytics 嵌入 API 中正确使用过滤器

google-cloud-platform - 谷歌驱动器 : What combination of scopes lets an app read existing files but not have edit/delete privileges?

javascript - 可以暂停 PHP 脚本,使用 HTML/JS 获取 GPS 位置,然后恢复 PHP 吗?

php - 位于 __ 的服务器 _ip_ 需要用户名和密码

google-sheets - “按条件过滤”Google 电子表格,按包含和排除的文本进行过滤

javascript - 如何将 Google 表格脚本代码启动到 Google 应用程序脚本网络应用程序中?

javascript - Google Apps 脚本中的集合和数据结构

google-api - 谷歌脚本 API : How to apply an onEdit function to every spreadsheet?