WAI
Status Update
Comments
jp...@google.com <jp...@google.com> #2
Generated Metadata
- Summary: When using the googleapis library to update Apps Script content with a service account, the API returns an error that the Apps Script API is not enabled, even though it is enabled. The user is able to successfully authorize, but the script content update fails.
- Tags:
Additional resources:
https://stackoverflow.com/.../can-the-google-apps-script-execution-api-be-c... https://stackoverflow.com/.../access-not-granted-or-expired-with-service-ac... https://developers.google.com/apps-script/api/concepts https://developers.google.com/apps-script/api/reference/rest/.../updateConte... https://developers.google.com/apps-script/guides/cloud-platform-projects
You can
bl...@google.com <bl...@google.com> #3
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for config assign for component 191640.
jp...@google.com <jp...@google.com> #4
But trying to create updates using service account
I think service accounts are not supported with this API. Please use OAuth with refresh token for offline workflows.
ru...@dealroom.net <ru...@dealroom.net> #5
Please use OAuth
As far as I understand, OAuth requires manual interaction, which is not applicable if we are trying to implement automatic code upload from GitHub repository using CI tools. Initially I tried to use service account's keys for that purpose. Is there a way to completely avoid any manual interaction for uploading?
Description
Description
Updating the GAS content using googleapis library fails. Error suggests to enable Apps Script API in
usersettings
, but it is already enabled.There is no problems with updating GAS contents using clasp library, which is using temporary OAuth token. Clasp library also requires Apps Script API to be enabled and, as it actually enabled, clasp works without any problem. But trying to create updates using service account causes problem which is impossible to solve, as all required changes are already applied.
Code
Output
User has not enabled the Apps Script API. Enable it by visiting https://script.google.com/home/usersettings then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Steps