We're sorry, authorization for the script was revoked during execution. Please reauthorize the script and try again.

111 views
Skip to first unread message

Мини Склад

unread,
Dec 17, 2021, 4:44:04 AM12/17/21
to Google Ads Scripts Forum
Good day.
Sorry for bad eanglish.
We have a problem with one script. 
Script was working from 11.18.2021 but 11.15.2021 we startinh to get errors.
On get() in the script "AdWordsApp.budgetOrders().withCondition('Status = ACTIVE').get();" we getting error "We're sorry, authorization for the script was revoked during execution. Please reauthorize the script and try again.". We trying create new script, remove permissions on page https://myaccount.google.com/permissions?pli=1 and reauthorize scripts, but we have the same error.
How we can fix this error?

Google Ads Scripts Forum Advisor

unread,
Dec 19, 2021, 9:52:49 PM12/19/21
to adwords...@googlegroups.com
Hi,

Thanks for reaching out. Harry here, from the Google Ads Scripts Team.

Can you kindly confirm if you are still experiencing the same issue as you have reported? Kindly provide your Google Ads account ID, script's name and a shareable link to your spreadsheet if available so I can take a look closer at the issue you are encountering. You may send the spreadsheet privately via the reply to author option.

Looking forward to your reply.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2TN5yE:ref

Мини Склад

unread,
Dec 20, 2021, 7:45:20 AM12/20/21
to Google Ads Scripts Forum
Hi,
Acc ID: 630-206-4480
Script's name: Выгрузка баланса
Script's ID: 5052540

For some reasons I can't send private message (menu element say me, that i have no permission to send messages).
понедельник, 20 декабря 2021 г. в 05:52:49 UTC+3, adsscripts:

Google Ads Scripts Forum Advisor

unread,
Dec 20, 2021, 11:18:12 PM12/20/21
to adwords...@googlegroups.com
Hello,

Thanks for coming back with the requested details. Unfortunately, I was not able to check for obvious reasons why are the script would fail authorization upon execution as I didn't get to replicate the issue on my end. Would you be able to make a new copy of the script instead to refresh authorization and execution, then let me know if you would still encounter the same? Please be guide as well of the limit of 250 authorized scripts per each user or email account that could be the reason why your script is failing authorization.

Let me know your thoughts.
Message has been deleted

Мини Склад

unread,
Dec 21, 2021, 4:55:43 AM12/21/21
to Google Ads Scripts Forum
Hello,

We have only one working script. We already make new copy of the script but the error is still there. Can you say what else can we do to fix this error?

вторник, 21 декабря 2021 г. в 07:18:12 UTC+3, adsscripts:

Google Ads Scripts Forum Advisor

unread,
Dec 22, 2021, 1:15:09 AM12/22/21
to adwords...@googlegroups.com
Hi,

Thanks for getting back. Could you try and create a new script with this simple send email code and see if you would encounter the same issue? On the other hand, would you be able to try to use a different email account to create scripts that has admin access to your Google Ads account? I can then raise this to the rest of the team for further investigation thereafter.

Мини Склад

unread,
Dec 22, 2021, 6:11:29 AM12/22/21
to Google Ads Scripts Forum
Hi,
Your script working, but we have error into our script. I told this in fist message. We get error on get(). Screenshot with code and error is attached. Repeating, script working from 11.18.2021 to 12.15.2021.
среда, 22 декабря 2021 г. в 09:15:09 UTC+3, adsscripts:
Снимок.PNG

Google Ads Scripts Forum Advisor

unread,
Dec 23, 2021, 2:47:36 AM12/23/21
to adwords...@googlegroups.com
Hi,

Thanks for trying that out. I can now say that the issue you are encountering is related to authorization but would be specific to your script code. However, I strongly believe that the issue lies in line 9 of your script as the AdsApp.​BudgetOrderIterator seems to be working as expected on my end. That said, would you be able to provide context on how your script should work so I can fully troubleshoot it on my end and see what you can adjust from there to resolve the issue?

On the other hand, can you kindly try to create a version of your script without the code for the third party APIs to check if the issue lies there instead? Moreover, please do note that our team's expertise does not extend to the use and implementation of Third-Party APIs.

Let me know how it goes.

Мини Склад

unread,
Dec 23, 2021, 5:06:15 AM12/23/21
to Google Ads Scripts Forum
Hi,
I modified script. Now script must have next algorithm:
1) Get active budgetOrders
2) getCost from 2015
3) getSpendingLimit
4) get difference of limit and cost
5) send difference to log
We get error on 1-st point.

Script code is attached
Снимок.PNG

четверг, 23 декабря 2021 г. в 10:47:36 UTC+3, adsscripts:
getBalance.txt

Google Ads Scripts Forum Advisor

unread,
Dec 24, 2021, 2:35:27 AM12/24/21
to adwords...@googlegroups.com
Hi,

Thanks for coming back. Appreciate your efforts into troubleshooting the issue on your end. On the other hand, would you be able to run that script with your today function? I was not able to run into any errors or even replicate the specific authorization error message you are encountering. On the other hand, I would strongly recommend that you try to use a different email account to create scripts that has admin access to your Google Ads account.
function today () {
  var date = new Date();
  var timeZone = AdWordsApp.currentAccount().getTimeZone();
  var format = 'yyyyMMdd';
  return Utilities.formatDate(date, timeZone, format);
}
Reply all
Reply to author
Forward
0 new messages