WARNING: unable to change permissions for everybody:

前端 未结 8 1018
后悔当初
后悔当初 2020-11-28 11:14

When running the Java quickstart sample at https://developers.google.com/drive/web/quickstart/java?hl=hu in NetBeans, I\'m receiving the error code:

Jun 04,         


        
8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 11:52

    Basically if you already enabled de Drive API and created credentials.json file at Google Drive API Rest, now you need :

    1 - Remove the tokens directory generated in you last execution. In this directory contains a file StoredCredential. 2 - Change de SCOPE to DriveScopes.DRIVE like sample bellow:

    private static List SCOPES = Collections.singletonList(DriveScopes.DRIVE);

    3 - Re run the program. It will be request that you login in your google account to give the access consent.

    4 - It will be generated a new one tokens directory in your project and now with with read and write permissions at google Drive.

    This work for me.

提交回复
热议问题