java - How to list all Google document from the Domain using Drive SDK? -
java - How to list all Google document from the Domain using Drive SDK? -
i want list document google domain.i have tried per mention in google documentation : https://developers.google.com/drive/v2/reference/files/list#examples
i have created service follow :
httptransport httptransport = new nethttptransport(); jacksonfactory jsonfactory = new jacksonfactory(); googlecredential credential = new googlecredential.builder() .settransport(httptransport) .setjsonfactory(jsonfactory) .setserviceaccountid(service_account_email) .setserviceaccountscopes(arrays.aslist(drivescopes.drive)) .setserviceaccountuser(useremail) .setserviceaccountprivatekeyfromp12file( new java.io.file(service_account_pkcs12_file_path)) .build(); drive service = new drive.builder(httptransport, jsonfactory, null) .sethttprequestinitializer(credential).build(); files.list request = service.files().list(); when executing request follows :
filelist files = request.execute(); i got 'useremail' (provided while creating service) files.
how can domain google drive files ?? have used super admin couldn't get.
to files in google apps domain need to:
setup domain-wide delegation of authority service business relationship , apps. use directory api users.list() api phone call determine users in google apps domain. as each user, phone call files.list(q='"me" in owners') list of files user owns.the combined results of these calls files in google apps domain.
java google-app-engine google-drive-sdk
Comments
Post a Comment