com.google.api.client.auth.oauth2.TokenResponseException: 401 Unauthorized

Stack Overflow | samatthias | 3 months ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    Google API credentials not working as expected

    Stack Overflow | 12 months ago | Vishal Zanzrukia
    com.google.gdata.util.AuthenticationException: Failed to refresh access token: 400 Bad Request { "error" : "invalid_grant" }
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.google.api.client.auth.oauth2.TokenResponseException

    401 Unauthorized

    at com.google.api.client.auth.oauth2.TokenResponseException.from()
  2. Google OAuth Client Library for Java
    TokenRequest.execute
    1. com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
    2. com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
    3. com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
    3 frames
  3. Google APIs Client Library for Java
    GoogleCredential.executeRefreshToken
    1. com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384)
    1 frame
  4. Google OAuth Client Library for Java
    Credential.refreshToken
    1. com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
    1 frame
  5. oauthsample
    GDriveAPI.main
    1. oauthsample.GDriveAPI.<init>(GDriveAPI.java:50)
    2. oauthsample.GDriveAPI.main(GDriveAPI.java:85)
    2 frames