I\'m currently playing around with Google Apps Script and can\'t get the following snippet to work.
You'll get that error when the service can't find the domain or you don't have access to it. Please ensure that the domain matches exactly, and doesn't start with "www.", etc.
Please try the below line
for(i=0;i<=80;i++) {
Logger.log('title=' + mySite[i].getTitle() + '\n' + 'name=' + mySite[i].getName());
}
I think you should use:
var mySite = 'https://sites.google.com/site/name_of_the_site';
var site = SitesApp.getSiteByUrl(mySite);