gpt4 book ai didi

google-sheets-api - Google Sheets API 上的 403 错误

转载 作者:行者123 更新时间:2023-12-03 14:58:54 24 4
gpt4 key购买 nike

网址

https://sheets.googleapis.com/v4/spreadsheets/[ID_OF_SPREADSHEET]?key=[MY_API_KEY]

我得到的
   {
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}

目前,为了测试,我的 API key 没有 key 限制。

I've had a look at a past question that's been popular but no luck.

最佳答案

这与此类似 403 error in Drive API其中您没有足够的权限。因此,您需要使用 OAuth 进行身份验证和授权。快速入门指南在 JavaScript 中有实现, Python ,等等。

要证明这一点,请转到 auth playground并获得“Google Sheets API v4”的权限。按照步骤操作并在步骤 3 中放置您的 URI 请求。之后执行操作应该不会出现问题。

检查这个 SO thread有关如何使用 OAuth Playground 的其他引用。

关于google-sheets-api - Google Sheets API 上的 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42806893/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com