Description
We run background jobs to keep our user’s tokens and zak tokens refreshed and valid. Occasionally, our jobs will return {“reason”=>“Invalid request : token created error: Save Access token into Database error”, “error”=>“invalid_request”}. Subsequent retries might work, but we end up with expired tokens sometimes because of this error.
Error
{“reason”=>“Invalid request : token created error: Save Access token into Database error”, “error”=>“invalid_request”}
Which App Type (OAuth / Chatbot / JWT / Webhook)?
Oauth, both account and user levels.
Which Endpoint/s?
/token/
How To Reproduce (If applicable)
Steps to reproduce the behavior:
Attempt to refresh token due to expire in a few minutes
{“reason”=>“Invalid request : token created error: Save Access token into Database error”, “error”=>“invalid_request”}
That is strange. Can you please email this error, and your request url, query params, and headers to developersupport@zoom.us so we can take a closer look?
Have you considered refreshing the tokens on user action, for example, once user clicks a create meeting button, check the database to see if the token is expired via the expires_in value, and then if expired, refresh the token, save the new tokens, and then call the API?
Your ruby code looks correct. I am guessing this is happening when you are batch calling the Zoom refresh token API.
Have you considered refreshing the tokens on user action, for example, once user clicks a create meeting button, check the database to see if the token is expired via the expires_in value, and then if expired, refresh the token, save the new tokens, and then call the API?
I’d like to also chime and say that we’ve seen this error message (Invalid request : token created error: Save Access token into Database error) twice in the last 24 hours when trying to renew a token.
Our engineers said that this error is thrown when refreshing with the same refresh token multiple times in a very short time. In this cases only one request (the first one) will return the 200 response with the new access token and refresh token, the other requests will return the error.
Ah brilliant, thanks for a quick response. I wanted to check the ticket because my logs pointed at exactly that issue, so thought I could give you a scenario to replicate. Thanks again!