Google 幻灯片 - 以编程方式发布到 Web Link

Google Slides - programmatically Get Publish to Web Link

有没有办法“发布到网络...”Google幻灯片演示文稿以编程方式

与表格不同,幻灯片需要额外的发布参数。我正在尝试弄清楚如何以编程方式推送演示文稿并获得已发布的 URL 以在我的应用程序中使用。

非常感谢任何帮助。

我还没有找到使用 Google Slides API. For this, you may want to file a feature request 的发布功能。

使用 Google 驱动器 API,您可能需要检查 Publishing revisions

For Google Docs, Sheets, and Slides you can publish any revision to the web by setting the published property. If the file is created in a G Suite domain, the publishedOutsideDomain property indicates whether the revision is accessible by anyone or if it is restricted to users of the domain.

观看 Google 工程师的 video 讨论相关提示和技巧以获取更多信息。

您可以设置 google 驱动器 API 的权限,使用 https://developers.google.com/drive/api/v3/reference/permissions/create 创建权限,包括 request_body 属性 "role":"reader" , "type":"anyone", "allowFileDiscovery": false (获得"anyoneWithLink" id权限) 并将 head 修订版(最后一个)设置为使用 https://developers.google.com/drive/api/v3/reference/revisions 发布,包括在请求正文中的属性 "published": true, "publishAuto": true, "publishedOutsideDomain": true,