-1

Is it possible to use Google Slides API to enable me to take an email lets say admin@gmail.com from my custom 3rd party website and add it so they can view the presentation only? I would then hopefully have a checkbox on their profile on the site so when it is unchecked it will remove them from the presentation and so on.

This would be a really good feature as it would reduce the admin burden and help me keep track of who I've allowed who to view my documents.

If this is possible does anyone have the code for it?

1 Answers1

0

Sure, you can easily do that using Drive API with a Permissions.Create [1] request. You can start from the quickstart [2] to set up the client in order to be able to make requests. In your case, you would need to know the file ID and use the following parameters:

{
  "role": "reader",
  "type": "user",
  "emailAddress": "user@email.com"
}

[1] https://developers.google.com/drive/api/v3/reference/permissions/create

[2] https://developers.google.com/drive/api/v3/quickstart/js

Andres Duarte
  • 3,166
  • 1
  • 7
  • 14