Why does SitesApp.getSites(myDomain) not work?

后端 未结 3 1267
有刺的猬
有刺的猬 2021-01-29 10:04

I\'m currently playing around with Google Apps Script and can\'t get the following snippet to work. \"enter

相关标签:
3条回答
  • 2021-01-29 10:27

    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.

    0 讨论(0)
  • 2021-01-29 10:29

    Please try the below line

    for(i=0;i<=80;i++) { 
    
    Logger.log('title=' + mySite[i].getTitle() + '\n' + 'name=' + mySite[i].getName());
    
     }
    
    0 讨论(0)
  • 2021-01-29 10:31

    I think you should use:

      var mySite = 'https://sites.google.com/site/name_of_the_site';
      var site = SitesApp.getSiteByUrl(mySite);
    
    0 讨论(0)
提交回复
热议问题