Howto: Gargle Authentication in Jupyter
TL;DR: See the code snippet at the bottom of this post for the code needed to get this to work.
gargle is a great little library for the R programming language that implements several authentication mechanisms against Google accounts. It’s used to power useful integrations like googlesheets4
, and googledrive
that allow R scripts to load data out of Google cloud resources. I recently started trying out Tiller for managing my personal finances, and I wanted to access my data from a JupyterLab notebook. When running on the command line, or in RStudio, gargle helpfully executes the OAuth flow by running a little local webserver that processes the authentication flow. In my JupyterLab setup, the kernel isn’t running on my machine directly. I tried running googlesheets4’s gs4_auth
, but got back:
Error in `gs4_auth()`:
! Can't get Google credentials.
ℹ Are you running googlesheets4 in a
...