0
var site = SitesApp.getSiteByUrl("https://sites.google.com/view/quizapptest");
Logger.log(site.getName());

I run this script. And I got error invalid argument url

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • That is a response if the url is giving a 404 not found, or any other error for that matter – JSDBroughton Jan 10 '19 at 12:33
  • But this url https://sites.google.com/view/quizapptest is not give a 404 for the account scriptstack0@gmail.com. And code is also written in that mail. –  Jan 10 '19 at 12:36
  • 1
    I got an answer. Code will works only classic site not for new Google site –  Jan 11 '19 at 12:53
  • 1
    add that as an answer to your own question - it's helpful information for future googlers. – JSDBroughton Jan 11 '19 at 14:04
  • Currently the new Google Sites does not provide API access. So if you need API access you are stuck with classic sites. – P Burke Jan 13 '19 at 11:55
  • Possible duplicate of [Google App Scripts For New Google Sites Release](https://stackoverflow.com/questions/41285533/google-app-scripts-for-new-google-sites-release) – Rubén Jan 20 '19 at 23:02

0 Answers0