When I run it, the log shows access: true scopes: undefined, and I get the following error:
Exception: Request failed for <url> returned code 403. Truncated server response: {
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"status": "PERMISSION_DENIED",
"details":... (use muteHttpExceptions option to examine full response)
I've tried copying the setScopes function out of the repo and running it on my scope array to make sure I wasn't just doing the input wrong, and it was properly generating a space-delimited list of scopes. Tried passing a space-delimited list string instead of an array, still comes back undefined. As best as I've been able to tell, the code is largely the same as whats found in the example I linked above.
The service appears to be successfully getting a token, but something is happening to the scopes. Any insight is appreciated.
I think this may have had something to do with the service account being too fresh? Ran the same code today, and it works as expected. Can no longer reproduce, closing the issue.
Experimenting with using gcp service accounts to query gemini from a spreadsheet. Using the example from the Google Workspace Installable Triggers guide.
When I run it, the log shows
access: true scopes: undefined
, and I get the following error:I've tried copying the setScopes function out of the repo and running it on my scope array to make sure I wasn't just doing the input wrong, and it was properly generating a space-delimited list of scopes. Tried passing a space-delimited list string instead of an array, still comes back undefined. As best as I've been able to tell, the code is largely the same as whats found in the example I linked above.
The service appears to be successfully getting a token, but something is happening to the scopes. Any insight is appreciated.