“You do not have access to library BloggerApp, used by your script, or it has been deleted.”
Google Apps Script throws the above error when I run the following code:
var thread = GmailApp.getInboxThreads(0,1)[0]; // get first thread in inbox
var message = thread.getMessages()[0]; // get first message
Logger.log(message.getBody()); // log contents of the body
I have isolated the problem to the GmailApp object call by testing the following subset of the above code (which produces the same error):
var thread = GmailApp;
Solution attempts tried & failed:
- I signed up for a Blogger account. (No impact.)
- I searched under the “manage libraries…” menu for “BloggerApp” (No results returned.)
- I attempted to publish my script as a service and add my script to my library. (This solution did not make logical sense to me at the time but I tried it anyway because I was running out of ideas.)
- I did a google search and a Stack Overflow search and found no similar issues anywhere on the internet.
This question has been resolved. The problem was caused by the unsuccessful attempt to add a 3rd-party script library into my script.