Fold functionality of noaa-onms/ocnms: test_gs4_auth.Rmd into functions for reading in a private GoogleSheet shared with shares@nms4gargle.iam.gserviceaccount.com using a JSON file for authentication:
Share [Master_OCNMS_infographic_content - Google Sheets](r gsheet) to shares@nms4gargle.iam.gserviceaccount.com.
Use
# ensure secret JSON file exists
stopifnot(file.exists(gsheets_sa_json))
# authenticate to GoogleSheets using Google Service Account's secret JSON
gs4_auth(path = gsheets_sa_json)
# access to this Google Sheet was granted to the Google Service Account
# by Sharing with its email: shares@nms4gargle.iam.gserviceaccount.com
sheet_names(gsheet)
Fold functionality of noaa-onms/ocnms: test_gs4_auth.Rmd into functions for reading in a private GoogleSheet shared with
shares@nms4gargle.iam.gserviceaccount.com
using a JSON file for authentication:Setup Service Account API Key
Reference:
Steps:
Save nms4gargle-774a9e9ec703 locally, in this case to
r gsheets_sa_json
.Share [Master_OCNMS_infographic_content - Google Sheets](
r gsheet
) toshares@nms4gargle.iam.gserviceaccount.com
.Use