com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" }

Stack Overflow | Sardonic | 5 months ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    400 Bad Request

    GitHub | 2 years ago | gstub
    com.google.api.client.auth.oauth2.TokenResponseException: 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

    400 Bad Request { "error" : "invalid_grant" }

    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.company.project
    ProjectHandler.handle
    1. com.company.project.GoogleServiceProvider.getGroups(GoogleServiceProvider.scala:81)
    2. com.company.project.ProjectHandler.handle(ProjectHandler.scala:110)
    2 frames
  8. com.company.common
    DispatcherServlet.service
    1. com.company.common.web.DispatcherServlet.service(DispatcherServlet.scala:40)
    1 frame
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    1 frame
  10. Jetty
    SelectChannelEndPoint$2.run
    1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
    2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
    3. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
    4. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
    5. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
    6. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    7. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
    8. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    9. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    10. org.eclipse.jetty.server.Server.handle(Server.java:524)
    11. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
    12. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
    13. org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    14. org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    15. org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    15 frames
  11. org.eclipse.jetty
    ExecuteProduceConsume.run
    1. org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    2. org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    3. org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    3 frames
  12. Jetty
    QueuedThreadPool$2.run
    1. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    2. org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
    2 frames
  13. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame