Refresh token no longer works after POST https://zoom.us/oauth/token API returned a 504

POST https://zoom.us/oauth/token API

Description

  • Hi. Currently our app received next error
{
	statusCode=504
	headers=
		Date: Thu, 15 Sep 2022 15:18:03 GMT
		Content-Type: text/html
		Content-Length: 132
		Connection: keep-alive
	body=
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
</body>
</html>

}

and further 

{
	statusCode=502
	headers=
		Date: Thu, 15 Sep 2022 15:18:07 GMT
		Content-Type: text/html
		Content-Length: 497
		Connection: keep-alive
		ETag: "613fcce0-1f1"
	body=
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>If you are the system administrator of this resource then you should check
the error log for details.</p>
<p><em>Faithfully yours, nginx.</em></p>
</body>
</html>

}

while, using stored refresh_token, calling POST https://zoom.us/oauth/token API to refresh an expired access_token. And now, we get { "reason": "Invalid Token!", "error": "invalid_grant" } when we try to use our stored refresh token. Usually this flow works correct for our app, but sometimes (once per 2.5 - 3 months) zoom api responds with this error. And for now, we have only one way to fix this → ask client to regenerate their refresh_token (which is so annoying). Can you please help us with this problem? Why zoom api sometimes responds with this error?

Hi @zoom_dev_sandbox ,

Thank you for bringing this to our attention. Yes this does happen on occasion and can be fixed with the customer regenerating their refresh_token as you’ve been doing. Unfortunately, we do not have a perfect configuration to 100% prevent the 504 gateway error at this time, but we are always making improvements to our developer experience :slight_smile:

Hi @gianni.zoom . So you mean that there is no way to prevent this issue happens?

Hi @zoom_dev_sandbox ,

There’s no absolute permanent way at this time that I can recommend, but we are working to reduce any sort of issues and errors like this.