We have several clients that are utilizing RingCentral integration with our application. We refresh the OAuthTOken using the RefreshToken once we see that the OAuthToken has expired (past its expiry date).
This seems to all work well and good for days, weeks, even months but sometimes the refresh process fails with the following error:
"error" : "invalid_grant",
"error_description" : "Login to account in current state is not allowed",
"errors" : [
{ "errorCode" : "OAU-142", "message" : "Login to account in current state is not allowed" }
]
My question is - what causes this error? I wish we could just ignore and try to refresh again but all subsequent refreshes fail with error 'Token not found' because the old refresh token is invalidated. This means the clients need to re-authorize their credentials.
My question is what causes this initial "Login to account in current state is not allowed" error? And what can we do to prevent it?
Thank you.