Reputation: 169
I was thinking this might work:
var ADF = DriveApp.getRootFolder().getFoldersByName('appDataFolder');
I also tried:
var ADF = Drive.Children.list('appfolder');
But I get: "The current scope does not allow use of the appdata folder"
The Drive Service v.2 is enabled both in the script resources and on the Developer's console. Version 3.0 is not listed is not available in the Resources dialogue box.
Is this folder accessible to stand-alone app script webapps at all?
I would like to store my webapp data files there, rather than creating a visible folder on the user's root.
Upvotes: 4
Views: 2529
Reputation: 197
During Google sign in, add the app data scope
to your list of sign in scopes.
Upvotes: 0
Reputation: 6791
Is this folder accessible to stand-alone app script webapps at all?
It is possible, using the right scope to access it.
Get authorization to use the Application Data folder
- To be able to use your Application Data folder, request access to the following scope:
https://www.googleapis.com/auth/drive.appdata
To add scopes, you must create a OAuth2 for Apps Script, here is a github sample of a Google Apps Script library to access the Appfolder in Google Drive.
Switch On the Google Advance Service
Hope this helps.
Upvotes: 1