You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My company has an internal Google domain and I'm attempting to read a Google spreadsheet from it. I keep getting permission errors when I try to use gs4_auth() or gs4_auth_configure().
If I use gs4_auth() I am taken to the authorization screen, choose "Yes", and then get this error:
I allowed "Tidyverse API Packages" access via admin.google.com > Security > Access and data control > API Controls (for some reason there were 6 IDs). My company's domain is "Trusted and block-exempt". gs4_auth() still did not work.
I also tried generating an API key and client ID for the Google Sheets API and used that:
library(googlesheets4)
library(gargle)
google_client <- gargle_oauth_client_from_json(
path = 'path_to_Google_Sheets_client_ID_json_file.json',
name = 'Name of client ID in Google Cloud Console')
gs4_auth_configure(client = google_client, api_key = 'Google_Sheets_API_generated_key')
gs4_oauth_app()
<gargle_oauth_client>
name: Name of client ID in Google Cloud Console
id: Client ID in Google Cloud Console
secret: <REDACTED>
type: installed
redirect_uris: http://localhost
But I get a permission error when I actually try to read in a sheet:
read_sheet('sheet_ID')
Error in `gs4_get_impl_()`:
! Client error: (403) PERMISSION_DENIED
• Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes,
the client doesn't have permission, or the API has not been enabled for the client project.
• The caller does not have permission
Eventually I would like this all done using encrypted service account credentials and would like to publish an Rmd with my code on our internal Posit Server, but I figure that is down the line if I can't even get the above to work.
The text was updated successfully, but these errors were encountered:
My company has an internal Google domain and I'm attempting to read a Google spreadsheet from it. I keep getting permission errors when I try to use
gs4_auth()
orgs4_auth_configure()
.If I use
gs4_auth()
I am taken to the authorization screen, choose "Yes", and then get this error:I allowed "Tidyverse API Packages" access via admin.google.com > Security > Access and data control > API Controls (for some reason there were 6 IDs). My company's domain is "Trusted and block-exempt".
gs4_auth()
still did not work.I also tried generating an API key and client ID for the Google Sheets API and used that:
But I get a permission error when I actually try to read in a sheet:
Eventually I would like this all done using encrypted service account credentials and would like to publish an Rmd with my code on our internal Posit Server, but I figure that is down the line if I can't even get the above to work.
The text was updated successfully, but these errors were encountered: