-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi. I'm receiving the error "The caller does not have permission" when running this.
I've configured the app in Google Console to allow the Google Sheets API—creating an API Key and a Service Account. The API Key is used in the app as GATSBY_GOOGLE_SHEETS_API_KEY, GATSBY_GOOGLE_SHEETS_SHEET_ID added from the Sheet URL, and the Service Account email was added to the Google Sheet with full Editor permissions.
I'm not entirely sure which apiKey value to set in the application env variable. Where is the correct API Key found/created? Is it created in the Service Account, the general Credentials settings in Console, or one of the values in the json file credentials?
Application Code (typescript)
const { data, loading, error } = useGoogleSheets({
apiKey: process.env.GATSBY_GOOGLE_SHEETS_API_KEY as string,
sheetId: process.env.GATSBY_GOOGLE_SHEETS_SHEET_ID as string,
});
Console error:
{
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
Metadata
Metadata
Assignees
Labels
No labels