通过 api 访问 google 电子表格

Accessing google spreedsheet through api

我正在尝试访问 google spreadsheet,但是当我发出请求时,即使 sheet 已设置 public 并且我仍然收到错误消息已发布。

The request cannot be identified with a client project. Please pass a valid API key with the request

the spreadsheet link

首先确保在 Google 开发者控制台中启用表格 API。并且在发出此请求时,请确保使用有效的 API 密钥。此错误通常是由于 Authorizing Requests 中的某些配置不正确或遗漏引起的。如果您 authorizing requests with OAuth 2.0,请确保您使用了正确的范围。

有关详细信息,您可以查看此thread,了解如何在收到 HTTP 401 或 403 时调试 Google OAuth 2.0 令牌