PMax Ads Script is Blocked - "This app is blocked - This app tried to access sensitive info in your Google Account"

2,152 views
Skip to first unread message

Daniel Cook

unread,
Sep 14, 2023, 3:06:39 AM9/14/23
to Google Ads Scripts Forum
Hi. I seem to be getting blocked while trying to run a script for one of my ad accounts. This is a script I've run without any issues for a couple of others, but I've started receiving the following error message (I've also attached it).

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

I'm not sure why I've started receiving now as I've put this script into a couple of accounts without issue already. Would someone be able to help me work out what I'm doing wrong?

Google Sheet is just a blank empty Google Sheet. Script is as follows...

function main() {
 
  // enter your sheet url & the campaign ID below
  let sheetUrl = 'https://docs.google.com/spreadsheets/d/1Rd9n5rrqs8o3nE8nN78AeHtjik71xKm-qQ5-d4nvauY/edit#gid=0'; // enter sheet URL between the quotes
 let campaignId = '20033272058'; // enter pmax campaign ID between quotes

// don't touch code below this line

   let ss = SpreadsheetApp.openByUrl(sheetUrl);

 let query = AdsApp.report(
  `
  SELECT
   campaign_search_term_insight.category_label,
   metrics.clicks,
   metrics.impressions,
   metrics.conversions,
   metrics.conversions_value
  FROM campaign_search_term_insight
  WHERE
   segments.date DURING LAST_30_DAYS
   AND campaign_search_term_insight.campaign_id = '${campaignId}'
  ORDER BY metrics.conversions
  `
 );

 query.exportToSheet(ss.getSheetByName('Sheet1'));

} // end main

Thanks
Dan
Screenshot 2023-09-13 163159.png

Daniel Cook

unread,
Sep 28, 2023, 4:08:54 AM9/28/23
to Google Ads Scripts Forum
Hi guys.

Just coming back to this for visibility. Does anyone know how I might be able to solve this?

Thanks in advance
Dan

Jan Hahlbrock

unread,
Sep 28, 2023, 4:31:12 AM9/28/23
to Google Ads Scripts Forum
Hey Dan,
this is normal when you try to run an apps script for the first time, as your code looks good you can try to look for the text underneath where it says in grey underscored letters "expand" or something like that. Click there and keep going.

Best,
Jan

Google Ads Scripts Forum Advisor

unread,
Sep 28, 2023, 6:42:48 AM9/28/23
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

By reviewing your query, I understand that you're unable to authorize the script. I would like to convey to you that authorize error  is out of our scope of the Google Ads Scripts. I suggest you reach out to the Google Ads Product support team as they are better equipped to assist you on this.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2olDML:ref"

Thanks,
 
Google Logo Google Ads Scripts Team


Eric Torres

unread,
Sep 29, 2023, 4:19:52 AM9/29/23
to Daniel Cook via Google Ads Scripts Forum
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/d1543356-0415-4481-9086-9380f7260622n%40googlegroups.com.

luke maggs

unread,
Oct 18, 2023, 1:47:37 AM10/18/23
to Google Ads Scripts Forum
I'm getting a very similar error to Daniel? Scripts that were working in account are still fine, but even when i create a default/blank script, I am getting a similar 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."

I cannot get past this oauth pop up and progress any further (aware of the normal dance of authorisation of scripts and this is different) 

A few days ago this was all fine (running multiple complex scripts), and now all of a sudden it does not work for any account in my Google Ads Manager account, nor for another colleague (also admin of the same MCC) 

any advice please, it's driving me insane as I need to create new  some scripts urgently! :) 

Mike Marshall

unread,
Oct 18, 2023, 9:52:24 AM10/18/23
to Google Ads Scripts Forum
I know this doesn't help to solve the problem but wanted to report that I'm also experiencing this issue - looks like a wider issue from reviewing this group and the multiple threads created about this recently. I've raised it with our Google rep but would be good to confirm this is a bug?

Ronja

unread,
Oct 19, 2023, 12:10:59 PM10/19/23
to Google Ads Scripts Forum
Also experiencing this over all of our accounts - found the issue on monday

Mike Rhodes

unread,
Oct 19, 2023, 6:41:33 PM10/19/23
to Google Ads Scripts Forum
Ginny Marvin has just confirmed on LinkedIn that this is NOT google blocking the scripts.
This is likely some local issue - either with Sheets permissions or something else (impossible for anyone to diagnose with so little info)
Sorry it's happening to you, but glad to hear it's def not google blocking scripts.

Have you used the same email/domain for the sheets & the account with the script?
Have you given the script permissions?
Is there an apps script running on that sheet?

sorry - there's just a lot of reasons why something might be blocked!

Mike Marshall

unread,
Oct 20, 2023, 4:42:07 AM10/20/23
to Google Ads Scripts Forum
Thanks for the details Mike, I saw your post on LinkedIn - good news that it's not a tactical choice by Google at least :)

Here are some answers to the questions you highlighted:

Have you used the same email/domain for the sheets & the account with the script? - Yes, accessing Ads via an MCC account with the same email as the Google account where I've created the sheet (using the URL sheets.new to do so)
Have you given the script permissions? - The error occurs when I try to authorise the script, but the correct Shopping content advanced API access box has been checked.
Is there an apps script running on that sheet? - No app scripts in the sheet, it's a brand new blank document with updated sharing permissions.

Google Ads Scripts Forum Advisor

unread,
Oct 20, 2023, 8:28:24 AM10/20/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you are getting the issue “This app is blocked” when trying to authorize a script.

I would like to inform you that our team is currently working on this issue. One of our teammates will get back to you once we have an update on this. Meanwhile, your patience is appreciated.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02olDML:ref"


Thanks,
 
Google Logo Google Ads Scripts Team


Fabiano Lira

unread,
Oct 20, 2023, 10:26:21 AM10/20/23
to Google Ads Scripts Forum
Same problem here and with Google Apps Scripts too.
Message has been deleted

Thomas Langguth

unread,
Oct 24, 2023, 2:15:13 PM10/24/23
to Google Ads Scripts Forum
same problem here since today.. i can´t authorize a new simple hello world script because the authorisation is blocked... i knew this problem from apps scripts in sheets when you need to have a  Google Cloud Platform project Number.
 But I have no idea what´s going on in google ads scripts...

Found out that i can (re)authorise older scripts,  but not new ones .. When to choose an account it says continue to unnamed script, but the script already has a name and is saved.. even when i click on the saved name of the script to open it and try to authorise.

Problem is with multiple google-accounts that have permission to the google ads accounts.

Hope that helps

charlesb...@gmail.com

unread,
Oct 24, 2023, 5:10:16 PM10/24/23
to Google Ads Scripts Forum
Hi,

I'm seeing the same thing as Thomas, and from what I've read we're not alone.
The scripts won't authorise with or without sheets so I doubt that's the issue.

Google have said they aren't blocking scripts...I think they mean they aren't blocking scripts on purpose.

Thanks

charlesb...@gmail.com

unread,
Oct 24, 2023, 5:41:27 PM10/24/23
to Google Ads Scripts Forum
Hi,

It appears there's a workaround:

1) Add a new Google Ads user

2) Authorize the script with the new user

3) Click "Advanced"

4) Click "Go to Test (unsafe)"

And Bob will hopefully be your uncle.

Same info with screenshots: https://shabba.io/blog/4

Thomas Grübel

unread,
Oct 25, 2023, 3:38:14 AM10/25/23
to Google Ads Scripts Forum
I have the same problem with different users here. Any real solution?

Google Ads Scripts Forum Advisor

unread,
Oct 25, 2023, 6:11:49 AM10/25/23
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Roy Bellingan

unread,
Oct 26, 2023, 2:29:43 AM10/26/23
to Google Ads Scripts Forum
Same error for me,

Aaron Bridgens

unread,
Oct 26, 2023, 9:59:30 AM10/26/23
to Google Ads Scripts Forum
Came here just to say that I have the same issue. I tested a script with just a single log command and still receiving the "app is blocked" error when I attempt to authorize the script.

Haley T

unread,
Oct 26, 2023, 12:33:09 PM10/26/23
to Google Ads Scripts Forum
Having the same issue as well. Everything was fine yesterday, but now we can't authorize any new scripts. 

Roy Bellingan

unread,
Oct 26, 2023, 12:33:09 PM10/26/23
to Google Ads Scripts Forum
What worked for me was just to use a new clean profile in the browser.
Same user, same all, just create a new profile, in firefox on linux start with
firefox  -profilemanager
No idea on windows, maybe you have to edit the link ?

Kristin Bradford

unread,
Oct 26, 2023, 1:43:15 PM10/26/23
to Thomas Grübel über Google Ads Scripts Forum

1) Add a new Google Ads user

2) Authorize the script with the new user

3) Click "Advanced"

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.

Maria Arnold

unread,
Oct 26, 2023, 1:48:02 PM10/26/23
to Thomas Grübel über Google Ads Scripts Forum
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---

On Wed, Oct 25, 2023 at 1:38 AM Thomas Grübel über Google Ads Scripts Forum <adwords...@googlegroups.com> wrote:

Christian Mcqueen

unread,
Oct 26, 2023, 1:48:12 PM10/26/23
to Thomas Grübel über Google Ads Scripts Forum
ok

On Wed, Oct 25, 2023 at 1:38 AM Thomas Grübel über Google Ads Scripts Forum <adwords...@googlegroups.com> wrote:
Message has been deleted

Stella Mckenzie

unread,
Oct 26, 2023, 1:50:05 PM10/26/23
to Thomas Grübel über Google Ads Scripts Forum
I have gone through the instructions in this group in detail but I am not seeing the any changes being made in the account when the script runs. 

I have only one modification in place, I want it to double the bids when it is raining. 


On Wed, Oct 25, 2023 at 1:38 AM Thomas Grübel über Google Ads Scripts Forum <adwords...@googlegroups.com> wrote:

Ronja

unread,
Nov 7, 2023, 6:29:59 AM11/7/23
to Google Ads Scripts Forum
Hey all, is there any update yet? Can any of you authorise scripts again? (I can't)

Raji Gill

unread,
Nov 7, 2023, 10:00:09 AM11/7/23
to Ronja über Google Ads Scripts Forum

Marilou

unread,
Nov 10, 2023, 4:10:30 AM11/10/23
to Google Ads Scripts Forum
Same issue here

Google Ads Scripts Forum Advisor

unread,
Nov 10, 2023, 1:25:29 PM11/10/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

Raji Gill

unread,
Nov 11, 2023, 1:36:45 AM11/11/23
to Marilou via Google Ads Scripts Forum

Visie Tubban

unread,
Nov 11, 2023, 4:12:53 PM11/11/23
to Mike Marshall via Google Ads Scripts Forum
Using your service for outreach, some of our clients have seen over 71% improvement in their conversions within a month of going live

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Nov 16, 2023, 8:21:01 AM11/16/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

I would like to inform you that our team is currently working on this issue. One of our teammates will get back to you once we have an update on this. Meanwhile, your patience is appreciated.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02olDML:ref"


Thanks,
 
Google Logo Google Ads Scripts Team


Nils Rooijmans

unread,
Nov 16, 2023, 8:57:28 AM11/16/23
to Google Ads Scripts Forum
Here are four ways to get around the issue in the meantime:

(If you don’t know how to install and run Google Ads Scripts yet, check out my guide on how to install Google Ads Scripts.)

SOLUTION 1:
Find the ‘Advanced’ link in the pop-up, click it, and then click “Go to Test (unsafe)”.
NB: It’s not unsafe unless you run scripts that are unsafe.

If you cannot find the link, or this isn’t working for you, move on to

SOLUTION 2:
Try authorizing the script with a different user account that has access to the Google Ads account (or create a new user for this purpose).

If this also isn’t working for you, move on to

SOLUTION 3:
Fix access restrictions in your Google Workspace:
Go into admin.google.com > API Controls > Google services > add ‘Apps Script Runtime’ (set to unrestricted)

If this also isn’t working for you, move on to

SOLUTION 4:
re-use an old script you’ve already authorized and don’t use anymore and replace the old code with your new code.


Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Khan Sab

unread,
Nov 16, 2023, 9:13:46 AM11/16/23
to Nils Rooijmans via Google Ads Scripts Forum
thanks

Vào Th 5, 16 thg 11, 2023 vào lúc 20:57 Nils Rooijmans via Google Ads Scripts Forum <adwords...@googlegroups.com> đã viết:
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Nov 16, 2023, 1:53:22 PM11/16/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

Please try the solution provided by @Nils. Meanwhile One of our teammates will get back to you once we have an update on this.

Google Ads Scripts Forum Advisor

unread,
Nov 27, 2023, 11:17:08 PM11/27/23
to adwords...@googlegroups.com
Hi,

We have an update.

I would like to inform you that the issue has been resolved for the new scripts. So, I request you to duplicate the existing script, try the authorization flow again on a new script and confirm us.

If the issue still exists, kindly provide us with the below details to further investigate the issue.
  • Google Ads account ID / CID
  • The name of the new script

Pascal Schumacher

unread,
Nov 28, 2023, 2:09:37 AM11/28/23
to Google Ads Scripts Forum
Hi,
unfortunately I still have the issue. 
I have tested it with a completely new script.

Thanks,

Pascal

pmoe...@binaerpark.de

unread,
Nov 28, 2023, 11:46:22 AM11/28/23
to Google Ads Scripts Forum
Same here

Ronja

unread,
Nov 29, 2023, 6:30:53 PM11/29/23
to Google Ads Scripts Forum
Same here, still not able to authorize scripts

Mike Marshall

unread,
Nov 30, 2023, 9:10:05 PM11/30/23
to Google Ads Scripts Forum
I've duplicated a script that wasn't working and still having issues. CID is 855-722-5268 and the script is called "all time bestsellers 2".

Robin

unread,
Nov 30, 2023, 9:10:47 PM11/30/23
to Google Ads Scripts Forum
This issue has been getting fixed for over a month now, and it's not clear what's causing it. We're also not sure if it can be successfully resolved in 2023. It's really frustrating for those who need to manage ads in bulk, and we really hope this problem can be resolved soon.

Raji Gill

unread,
Nov 30, 2023, 11:43:04 PM11/30/23
to Mike Marshall via Google Ads Scripts Forum
thanks

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.

Google Ads Scripts Forum Advisor

unread,
Dec 1, 2023, 8:39:28 AM12/1/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

I would like to inform you that our team is currently working on this issue. One of our teammates will get back to you once we have an update on this. Meanwhile, your patience is appreciated.
 

Roy Bellingan

unread,
Dec 1, 2023, 9:45:04 AM12/1/23
to Google Ads Scripts Forum
no one is working on this issue.
Please stop spamming you own forum with the same answer, this problem is going on since YEARS.

Google Ads Scripts Forum Advisor

unread,
Dec 4, 2023, 4:52:30 AM12/4/23
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

Please be informed that our team is actively addressing this matter, and currently, there are no new updates to share. We value your patience in this regard. 

Google Ads Scripts Forum Advisor

unread,
Dec 5, 2023, 8:58:00 PM12/5/23
to adwords...@googlegroups.com
Hi,

We have an update.

I would like to inform you that the issue has been resolved for the new scripts. So, I request you to duplicate the existing script and try the authorization flow again on a new script and confirm us?


If the issue still exists, kindly provide us with the below details to further investigate the issue.
  • Google Ads account ID / CID
  • Name of the new script
Reply all
Reply to author
Forward
0 new messages