I am trying to do a simple call to get the email address of an account:
gmail().users().getProfile("me").execute().getEmailAddress();
However it always returns a user-rate-limited response:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 429 unknown
{
"code" : 429,
"errors" : [ {
"domain" : "usageLimits",
"message" : "User-rate limit exceeded. Retry after 2019-09-18T18:49:00.748Z",
"reason" : "rateLimitExceeded"
} ],
"message" : "User-rate limit exceeded. Retry after 2019-09-18T18:49:00.748Z"
}
Regardless of waiting after the time mentioned, it always is returning this response. I had it retry for once an hour for the past 14 hours and it is still giving this response. I have checked my API quota and confirmed there is no other usage of the user for GMail in the timeframe.
I do have exponential backoff implemented, however due to an internal issue on my script yesterday there were many requests in a short period of time to the GMail API. As expected it hit the rate limit, but it appears that the rate limitation has not "turned off" since. Is this user-account blacklisted? How can I get the account up and running again?