We are getting Credential could not be refreshed error occasionally. We are using java client library version v201708.
I generated new refreshToken also but that did not work to solve the issue permanently.
Below is the stack trace.
[20 Sep 2017 05:15:42,370-AdwordsDataServicesImpl:ERROR:main] Error in getting AdwordsSession with given credentials
com.google.api.ads.common.lib.exception.OAuthException: Credential could not be refreshed.
at com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:229)
at com.aaa.adwords.services.AdwordsDataServicesImpl.generateAdwordsSession(AdwordsDataServicesImpl.java:57)
at com.aaa.adwords.Application.main(Application.java:52)
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 401 Authorization Required
at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:69)
at com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:223)
... 2 more