An interface to the Gmail RESTful API. Allows access to your Gmail messages, threads, drafts and labels.
Exposing the Gmail API from R.
my_drafts = drafts()
my_history = history(start_num)
my_labels = labels()
my_messages = messages("search query")
my_threads = threads("search query")
modify_thread(thread_id, add_labels=c("label_1"), remove_labels=c("label_2"))
By default gmailr will use a global project. However if you are going to be doing a heavy user and will do a lot of queries please setup your own project with the steps below.
Register a new project at https://console.cloud.google.com
On, and other API status to
APIs & auth->Consent screen
APIs & auth->Credentials
Use the downloaded JSON file as input to
```R gmail_auth('file.json') ```