Hello,

I'm encountering an issue with accessing ScriptApp.getProjectTriggers() in 
my script. When I try to call this function, it fails with the following 
error message:

*Exception: You do not have permission to call 
ScriptApp.getProjectTriggers. Required permissions: 
https://www.googleapis.com/auth/script.scriptapp*

Here's the relevant code snippet:
```
function existingTriggers() {
  return ScriptApp.getProjectTriggers();
}

```
I've already added the necessary OAuth scopes in my appsscript.json file:

```
{
  "oauthScopes": [
    "https://www.googleapis.com/auth/spreadsheets";,
    "https://www.googleapis.com/auth/script.scriptapp";
  ],
  "timeZone": "Asia/Kolkata",
  "dependencies": {},
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "webapp": {
    "executeAs": "USER_DEPLOYING",
    "access": "MYSELF"
  }
}

```
Interestingly, when I manually run the onOpen function by clicking "Run" in 
the Apps Script editor, it executes without any issues.

Could you please advise on how to resolve this permission error? Thank you.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/025c53d9-97a6-44af-bf7b-bd6145b017ban%40googlegroups.com.
  • Sc... Shubham Verma
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to