Muhammad Gelbana
Muhammad Gelbana

Reputation: 4000

Is it possible to tailor DocsList \ DriveApp permissions?

I need to access the user's Google drive. All I need is to create a folder and create some files in it. Nothing more. But the permission granted by the API allows me to manage and view the user's whole drive.

So how can I specify the folder I need to access and what can I do (i.e. create files, delete files, rename files..etc)

I'm currently using the DocsList API.

Upvotes: 0

Views: 100

Answers (1)

Zig Mandel
Zig Mandel

Reputation: 19835

Not possible. Dont use docsList as its deprecated. Use driveApp. In apps script you have only two options: 1) permission to the entire drive read/write, like you have now. 2) permission for the 'current doc' only (read/write) but it only applies to container scripts and add-ons by using a special comment. This cant be used in webapps. See https://developers.google.com/apps-script/guides/services/authorization#manual_authorization_scopes_for_sheets_docs_and_forms

Upvotes: 1

Related Questions