Gets information about the user, the user's Drive, and system capabilities.
Example
// Before running the sample: // - Enable the API at: // https://console.developers.google.com/apis/api/drive.googleapis.com // - Login into gcloud by running: // `$ gcloud auth application-default login` // - Install the npm module by running: // `$ npm install googleapis`
asyncfunctionmain() { constauth = newgoogle.auth.GoogleAuth({ // Scopes can be specified either as an array or as a single, space-delimited string. scopes: [ 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata', 'https://www.googleapis.com/auth/drive.metadata.readonly', 'https://www.googleapis.com/auth/drive.photos.readonly', 'https://www.googleapis.com/auth/drive.readonly', ], });
// Acquire an auth client, and bind it to all future calls constauthClient = awaitauth.getClient(); google.options({auth:authClient});
// Do the magic constres = awaitdrive.about.get({}); console.log(res.data);
Gets information about the user, the user's Drive, and system capabilities.
Example
Returns
A promise if used with async/await, or void if used with a callback.