Reputation: 124
I´m having a problem to read emails in a corporative Gmail account, specifically a Gsuite Gmail account.
I followed this steps already:
Unfortunately I'm receiving this error: com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized
Thank you very much for any help that you can provide.
Greetings
Upvotes: 1
Views: 540
Reputation: 124
It was a problem with the maven dependencies.
Using these dependencies solved the problem.
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-gmail</artifactId>
<version>v1-rev73-1.23.0</version>
</dependency>
Upvotes: 0