What is this error? API call to drive.permissions.insert failed with error: Internal Error

1,082 views
Skip to first unread message

JMR

unread,
Jul 2, 2020, 1:54:21 AM7/2/20
to Google Apps Script Community
Hi, I am trying to add several users in Shared Drive's folder or files and I have been seeing this error below. Should I be concerned about this or do you know a way to resolve this error? The script I have been works but sometimes I do see this error. Your thoughts is appreciated. Thanks.

API call to drive.permissions.insert failed with error: Internal Error


Tanaike

unread,
Jul 2, 2020, 3:54:46 AM7/2/20
to Google Apps Script Community
When the multiple permissions are created to a file and a folder in the loop, there is the case such error occurs. So although I'm not sure whether this is the direct solution because I'm not sure about the detail of your situation, for example, how about using "Utilities.sleep()" and/or the batch request?
2020年7月2日木曜日 14:54:21 UTC+9 JMR:

JMR

unread,
Jul 6, 2020, 11:24:08 AM7/6/20
to Google Apps Script Community
Thank you Tanaike. I will try that Utilitilies.sleep().

JMR

unread,
Aug 13, 2020, 1:35:02 PM8/13/20
to Google Apps Script Community
@Tanaike - I figured out what the issue is. I had to change "role" from user and group and after that the script ran just fine. I also used the Utilities.sleep() which also helped.

Thanks!
Reply all
Reply to author
Forward
0 new messages