access denied (java.io.FilePermission \images\849cfc1ab7e594e7dba28cfdf37cf9bea87c5de2-privatekey.p12 } in google app engine using drive api -


fed err access denied (java.io.filepermission \images\849cfc1ab7e594e7dba28cfdf37cf9bea87c5de2-privatekey.p12 } in google app engine using drive api

i trying access drive api using service account.i write code https://developers.google.com/drive/service-accounts.

however getting err while accessing file @ file reading time @ last line. here code

httptransport httptransport = new nethttptransport();           jacksonfactory jsonfactory = new jacksonfactory();           googlecredential credential = new googlecredential.builder()               .settransport(httptransport)               .setjsonfactory(jsonfactory)               .setserviceaccountid(service_account_email)               .setserviceaccountscopes(drivescopes.drive)               .setserviceaccountprivatekeyfromp12file(                 new java.io.file(service_account_pkcs12_file_path))               .build();           drive service = new drive.builder(httptransport, jsonfactory, null)               .sethttprequestinitializer(credential).build(); 

kindly suggest....

app engine apps can identify directly, don't need use service accounts. if don't have particular reason use service, recommend take @ https://developers.google.com/appengine/docs/java/appidentity/overview#asserting_identity_to_google_apis


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -