google apps script - Do not have permission to call getPageByUrl -


I have written a new script on a Google script that accesses a spreadsheet and displays data on the current list page. Similar scripts are working on, however, this particular part of this code in this script:
  var page = SitesApp.getPageByUrl ("https://sites.google. Com / a / domain.com/page-url ");   

returns an error message: "You do not have permission to call getPageByUrl".

I am not the owner of the site and the goal page, I am not sure what is happening here, can anyone lend a hand? From:

From: You can not use the URL in this format. This should be on the "canonical" site format, such as: https://sites.google.com/a/example.com/examplesite/examplepage

Comments