googleAuthR - Google API R Client
This library allows you to authenticate easily via local use in an OAuth2 flow; within a Shiny app; or via service accounts.
The main two functions are
This takes care of getting the authentication token, storing it and refreshing. Use it before any call to a Google library.
This creates functions for you to use to interact with Google APIs. Use it within your own function definitions, to query the Google API you want.
Auto-build libraries for Google APIs with OAuth2 for both local and Shiny app use.
Get more details at the googleAuthR website
R Google API libraries using googleAuthR
Here is a list of available Google APIs to make with this library.
The below libraries are all cross-compatible as they use
googleAuthR for authentication backend e.g. can use just one OAuth2 login flow and can be used in multi-user Shiny apps.
- googleComputeEngineR - Google Compute Engine VMs API
- searchConsoleR - Search Console API
- bigQueryR - BigQuery API. Part of the cloudyr project.
- googleAnalyticsR - Google Analytics API
- googleTagManagerR - Google Tag Manager API by IronistM
- googleID - Simple user info from G+ API for Shiny app authentication flows.
- googleCloudStorageR - Google Cloud Storage API
- RoogleVision - R Package for Image Recogntion, Object Detection, and OCR using the Google's Cloud Vision API
- googleLanguageR - Access Speech to Text, Entity analysis and translation APIs from R
Feel free to add your own via email or a pull request if you have used googleAuthR to build something cool.
googleAuthR now has an R package generator which makes R package skeletons you can use to build your own Google API R package upon. Browse through the 154 options at this Github repository.
Example Shiny app
An example shiny app with Google authentication is deployed to shinyapps.io here. It uses the example app that is available in
- Jenny Bryan and her work on the googlesheets package that this work derives from.
- Hadley Wickham for httr's OAuth2 excellence
- RStudio team for Shiny
- Johann de Boer for some code contributions.
googleAuthR is available on CRAN
Check out News to see the features of the development version.
If you want to use the development version on Github, install via: