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

后端 未结 7 1703
隐瞒了意图╮
隐瞒了意图╮ 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:31

    After a long time searching, I found this answer hidden in the search engine:

    Change the line where you define scopes to:

    private static final List SCOPES = Arrays.asList(GmailScopes.MAIL_GOOGLE_COM);
    

    https://stackoverflow.com/a/38599382/1317559

提交回复
热议问题