谷歌云平台API oauth_服务_令牌,带R(httr)

谷歌云平台API oauth_服务_令牌,带R(httr),r,google-cloud-platform,R,Google Cloud Platform,我正在尝试获取对GCP的API访问,而httr oauth_service_token()调用对我的端点不起作用。。。谢谢你的帮助。json密钥文件与一个等效的python程序一起工作,因此密钥文件本身就可以了 如果我取消对oauth_端点(“google”)行的注释,我确实会得到google帐户的令牌-因此oauth_代码本身看起来不错,但只是不适用于GCP。 我尝试了其他随机访问URL,但下面的URL是RESTAPI指定的 keyFile <- "TwitterAPI-App-51ca

我正在尝试获取对GCP的API访问,而httr oauth_service_token()调用对我的端点不起作用。。。谢谢你的帮助。json密钥文件与一个等效的python程序一起工作,因此密钥文件本身就可以了

如果我取消对oauth_端点(“google”)行的注释,我确实会得到google帐户的令牌-因此oauth_代码本身看起来不错,但只是不适用于GCP。 我尝试了其他随机访问URL,但下面的URL是RESTAPI指定的

keyFile <- "TwitterAPI-App-51ca9b46ce60.json"
endpoint <- oauth_endpoint(authorize= "https://www.googleapis.com/oauth2/v3/token", 
                          access = "https://www.googleapis.com/oauth2/v3/token", 
                           base_url = "https://www.googleapis.com")
# endpoint <- oauth_endpoints("google") # default is for accounts.google.com, I need GCP access

secrets <- jsonlite::fromJSON(keyFile)
scope <- "https://www.googleapis.com/auth/devstorage.read_write"

gtoken <- oauth_service_token(endpoint, secrets, scope) => GCP token fails, google account works

keyFile我看到了httr代码中的bug。aud是硬编码的,不接受端点中的值。我需要弄清楚如何对修复进行拉取请求

jwt\u索赔集
jwt_claimset <- function(iss, scope,
                         aud = "https://accounts.google.com/o/oauth2/token",
                         exp = NULL, iat = NULL) {