"The OAuth identity of this script has been deleted or disabled. This may be due to a Terms of Service violation."
I run a google script on a google sheet which notifies other users at my organization that I have uploaded the google sheet information to our database. This script suddenly stopped working and threw up the error quoted at the top of this post. As far as I know, there were no recent changes to the ownership of relevant files/folders. Please help! I need this script in my everday work.
Had the same issue, the fix is :
You are all set to ok. I changed function and script name before executing, not sure if that was needed.
I had faced the same issue recently and solved the same as follows -
This seems to fix the problem, but in fact it does not.
The problem is related to the cloud project bound to the script, The reason turned out to be that the TOS for Cloud projects changed and that the user has to acknowledge this. If that does not happen then after some time the whole shebang is disabled and you get the error message.
(This is why a copy seems to work: it works until some Google bot notices that it is bound to a project without TOS acknowledgement and then it disables it.)
The solution: - open the script - click Resources > Cloud Platform project - click on the bound project.
This will open up the Cloud console and also show the popup for you to acknowledge the new TOS. If you agree to this, you're set and your script works again.
Note: it seems that you need to do this only once for the Cloud environment. So if you have several scripts then you need to do this for one script only. Or access the Cloud environment directly and acknowledge the new TOS.
Note: even if you though your script is not bound to a Cloud project, trust me... it is. If you do not bind it yourself, then it is bound to a default project specific to that script.
Hope this helps.