Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets Google Sheets API:调用方没有权限_Google Sheets_Google Sheets Api_Google Apis Explorer - Fatal编程技术网

Google sheets Google Sheets API:调用方没有权限

Google sheets Google Sheets API:调用方没有权限,google-sheets,google-sheets-api,google-apis-explorer,Google Sheets,Google Sheets Api,Google Apis Explorer,我正在尝试从cron读取文档: https://sheets.googleapis.com/v4/spreadsheets/?key=) 同时,文档本身可以通过任何计算机和浏览器的链接成功打开,甚至可以通过未经授权的用户打开 此问题于7月9日晚上09:35(UTC+0)开始出现 在此错误之前,我使用#1键设置成功地从文档接收数据 更新: 我发现了另一个奇怪的细微差别:在所有其他文件上都没有这样的问题。在一个特定文档上观察到错误。我将访问设置与其他设置进行了比较-它们是相同的 更新2: 我试图复制

我正在尝试从cron读取文档:

https://sheets.googleapis.com/v4/spreadsheets/?key=)

同时,文档本身可以通过任何计算机和浏览器的链接成功打开,甚至可以通过未经授权的用户打开

此问题于7月9日晚上09:35(UTC+0)开始出现

在此错误之前,我使用
#1键设置成功地从文档接收数据

更新:

我发现了另一个奇怪的细微差别:在所有其他文件上都没有这样的问题。在一个特定文档上观察到错误。我将访问设置与其他设置进行了比较-它们是相同的

更新2:

我试图复制表并通过API打开它-错误是相同的。 一个小时后,我又试了一次——一切都成功了。

看到评论后,我将我的工作表的访问权限更改为查看模式下的**有链接**的任何人


更改访问权限后,它工作正常。如果担心数据安全,那么最好的选择是使用OAuth 2.0客户端ID作为凭据。

正如@thinktweeps所说的,建议在工作表中使用链接的任何人打开


我使用的是python,这个
创建的\u电子表格.share(“”,role='reader',type='anywhere')
对我有效。

我也有同样的问题。它今天早上工作,但今天下午在没有变化后出错。也许这是谷歌的问题。我们也有同样的问题,公开的电子表格,但API拒绝许可。。。一定是谷歌的附带问题在这里发布了:我也遇到了这个问题。如果有人更新了一个解决方案,他们可以分享吗?它只是在我的公开页上工作!
My #1 key settings:    
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
 - API restrictions - none
My #2 key settings:
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
 - API restrictions - Google Sheets API
My #3 key settings:
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - I added my external IP address.
 - API restrictions - Google Sheets API, Google Drive API
My #4 key settings:
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - none
 - API restrictions - Google Sheets API
My #5 key settings:
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - none
 - API restrictions - Google Sheets API, Google Drive API
My #6 key settings:
Application restrictions:

 - IP addresses (web servers, cron jobs, etc.) - none
 - API restrictions - none
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED"
  }
}