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

Stack Overflow | MesamH | 4 months ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

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.intercept
    1. com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
    2. com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
    2 frames
  5. Google HTTP Client Library for Java
    HttpRequest.execute
    1. com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
    1 frame
  6. Google APIs Client Library for Java
    AbstractGoogleClientRequest.execute
    1. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
    2. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
    3. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
    3 frames
  7. com.brookfieldres.library
    ExtractionTest.getEmails
    1. com.brookfieldres.library.test.ExtractionTest.getEmails(ExtractionTest.java:36)
    1 frame
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  9. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    6. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    7. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    15. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    15 frames
  10. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    1 frame
  11. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    5 frames