r/GoogleAppsScript • • Mar 25 '23

Question How to unblock Apps Scripts?

When I try to run Apps Scripts for any script that works on other Google accounts I get this error

This app is blocked

This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.

There is no option to allow access or to edit this from the pop up window. In my account security/3rd party panel the app doesn't show.

I can't run any scripts in this account.

Is there a way to 'unblock' or add App Scripts in my account manually?

Thanks,

6 Upvotes

11 comments sorted by

View all comments

Show parent comments

1

u/DReid25 Mar 26 '23

Thanks but no it's just a simple setup on a personal account.

1

u/IAmMoonie Mar 26 '23

Have you definitely authorised it?

Try copy and pasting this and running the function from the editor:

function auth(){
   console.log(“authorised”)
}

It will force authentication for the account that you’re using if it’s not already authorised the APIs.

What is your script doing?

1

u/DReid25 Mar 27 '23

Thanks. When I tried to save the script on its own I received this error. I was unable to save and run.

Syntax error: SyntaxError: Invalid or unexpected token line: 2 file: Code.gs

1

u/IAmMoonie Mar 27 '23

Can you share the file?