Kiran S
Kiran S

Reputation: 1

getting while accessing gmail api from java

Exception in thread "main" java.lang.RuntimeException: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request POST https://oauth2.googleapis.com/token { "error": "invalid_grant", "error_description": "Token has been expired or revoked." }

token has expired and i have created new Oauth2.0 client id, and verified configure consent screen ,still giving this com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request POST https://oauth2.googleapis.com/token { "error": "invalid_grant", "error_description": "Token has been expired or revoked." }

And when i tried with postman creating new access token its giving redirecting to particular gmail account along with 400 errorenter image description here

Upvotes: 0

Views: 178

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116868

Token has been expired or revoked.

means just that your refresh token has expired or been revoked by the user you need to prompt the user to authorize your application again.

Upvotes: 0

Related Questions