在 Shiny 应用程序中使用 Google SearchConsoleR 数据

Use Google SearchConsoleR Data in Shiny Application

我已经创建了一个 API 密钥、OAuth 2.0 客户端 ID json 文件和一个服务帐户电子邮件。如何在不打开浏览器进行身份验证的情况下自动连接到带有 searchConsoleR 包的 google 搜索控制台?

为了googleAnalyticsR我做了这个

googleAuthR::gar_set_client(json = here::here("credentials/client_id.json"))
googleAnalyticsR::ga_auth(email = "email",
                          json_file = here::here("credentials/file.json"))

但是我无法连接到搜索控制台。是否有任何好的文档说明我可以在浏览器中无需身份验证的情况下自动连接到 google 搜索控制台?

看看这个:

options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/webmasters")
gar_auth_service(json_file = "/service-account-key.json")