I need to publish the Slide file to website and get the published URL, But I am not getting the published URL as a return response.
The Drive service is turned on already.
I tried with
function doGet(e) { var ppt = SlidesApp.openByUrl('https://docs.google.com/presentation/d/1fIQpQJ8QaIqt3fibTGmlAndZuvDG3ry8maAm_0CgSLE/edit#slide=id.p'); var fileId = ppt.getId(); var revisions = Drive.Revisions.list(fileId); var items = revisions.items; var revisionId =items[items.length-1].id; var resource = Drive.Revisions.get(fileId, revisionId); resource.publishAuto = true; resource.publishedOutsideDomain = true; resource.published = true; return ContentService.createTextOutput(JSON.stringify(Drive.Revisions.update(resource, fileId, revisionId).publishedLink)); }
console.log(JSON.stringify(Drive.Revisions.update(resource, fileId, revisionId).publishedLink)))