首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >客户端没有足够的权限

客户端没有足够的权限
EN

Stack Overflow用户
提问于 2020-04-22 10:18:16
回答 3查看 1.8K关注 0票数 1

我目前正在运行

代码语言:javascript
复制
library(googlesheets4)
sheets_auth()

dat=read_sheet("https://docs.google.com/spreadsheets/d/1R9XuH9Wej-p6HdkFGV2IsHuCmA9w0s7M3-jzE3S-Qrs/edit#gid=950673024", sheet="Summary", range=cell_rows(1:777))

并获得以下输出。

代码语言:javascript
复制
Suitable tokens found in the cache, associated with these emails:
  * dcallow@umd.edu
  * ddcc2442@gmail.com
The first will be used.
Using an auto-discovered, cached token.
To suppress this message, modify your code or options to clearly consent to the use of a cached token.
See gargle's "Non-interactive auth" vignette for more details:
https://gargle.r-lib.org/articles/non-interactive-auth.html
The googlesheets4 package is using a cached token for dcallow@umd.edu.
> 
> dat=read_sheet("https://docs.google.com/spreadsheets/d/1R9XuH9Wej-p6HdkFGV2IsHuCmA9w0s7M3-jzE3S-Qrs/edit#gid=950673024", sheet="Summary", range=cell_rows(1:777))
Error: Client error: (403) PERMISSION_DENIED
  * Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project.
  * The caller does not have permission

我不确定问题是不是它迫使我使用第一封电子邮件?可以换成第二个令牌吗?但我也很困惑,为什么我不再被要求进入我的谷歌账户进行身份验证?

你知道为什么会发生这种情况吗?我是API的新手。

EN

回答 3

Stack Overflow用户

发布于 2020-12-29 07:03:32

你可以试试这个

库(Googlesheets4)

gs4_auth_configure(api_key =“A.bMGBUA”)

您应该在credentials https://console.cloud.google.com/apis/credentials中创建一个api key

我等着它能帮到你

票数 1
EN

Stack Overflow用户

发布于 2021-08-17 11:51:56

这可能是因为您在使用gs_auth登录时,一定是选择了错误的权限。要重新分配您的权限,首先使用gs_deauth()进行deauth,然后使用gs_auth(),然后在下一个选项中,在Selection:中输入0以重新初始化您对谷歌帐户的访问。确保在浏览器窗口中分配权限时,选中了读取、写入电子表格的复选框。

如果你不能做到这一点,请评论。

继续编码!

票数 1
EN

Stack Overflow用户

发布于 2021-10-21 19:38:59

你也可以在谷歌页面上的“分享”按钮下,将GoogleSheet链接设置为“互联网上任何拥有该链接的人都可以查看”。然后:

代码语言:javascript
复制
googlesheets4::gs4_deauth()
CellROSConc <- read_sheet("https://docs.google.com/spreadsheets/d/1bxTIKTNfv-n3Y-JMJCOlt14Ec3e4tSdBQZg-HiuypOY/edit?usp=sharing")
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61356212

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档