I am trying to use set_service_token
in the bigrquery
package for a non-interactive authentication.
Here is my code:
library(bigrquery)
set_service_token("client_secret.json")
But it kept showing the error message below:
Error in read_input(file) :
file must be connection, raw vector or file path
However, when I simply to read the JSON path, it works:
lapply(fromJSON("client_secret.json"), names)
$`installed`
[1] "client_id" "project_id" "auth_uri" "token_uri" "auth_provider_x509_cert_url" "client_secret" "redirect_uris"
Can anyone help me with this? Thank you very much!