Closed vikram-rawat closed 5 years ago
I am having trouble with this json
authentication too. Having run use_secret_file
line-by-line, the structure of the json
appears to be different than anticipated.
info <- jsonlite::fromJSON(readChar("path/to/myproject-*****.json", nchars = 1e+05))
info$installed$client_id
## [1] NULL
Instead, the client id is just found in info$client_id
and info$installed
is NULL
. There doesn't seem to be any client_secret
. Not sure if private_key
is what they call that now or ...
> names(info)
## [1] "type" "project_id"
## [3] "private_key_id" "private_key"
## [5] "client_email" "client_id"
## [7] "auth_uri" "token_uri"
## [9] "auth_provider_x509_cert_url" "client_x509_cert_url"
This should be fixed by https://github.com/r-lib/gmailr/pull/113
I am trying to schedule a task of downloading attachments from emails and uploading them to a website after a certain manipulation in data.
but I am not able to authenticate my gmail with a credential file.
I have the file. when I run
use_secret_file('D:/R_CODE/David_lal/client_secret_511687295850-3pegdu3n0t2f8iu826m3cl4n1nklb08f.apps.googleusercontent.com.json')
it gives me no error at all.
but when I try to run a code.
it gives me this error
Error in itr(...) : Unauthorized (HTTP 401).
I have a valid credential file. Which I have created by following the mentioned step on your site.
Please help me out here.