com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden

后端 未结 7 1655
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 23:45

I am trying to upload a text file to my Google Drive account. No matter what, I always encounter an com.google.api.client.googleapis.json.GoogleJsonResponseException:

7条回答
  •  醉梦人生
    2020-12-15 00:35

    I had the same problem but in my case resolve this with:

    private static final List SCOPES =
            Arrays.asList(DriveScopes.DRIVE);
    

    from DriveScopes

    and also create a new directory

    private static final java.io.File DATA_STORE_DIR = new java.io.File(System.getProperty("user.home"), ".credentials/2/drive-java-quickstart.json");
    

    and i solved the problem

提交回复
热议问题