How to refresh token if refresh_token in incorrect

Actually, it has happened again. And this time, I got to the diagnostic logs early enough to see why. Here is what happened:

  1. Client (my) code sends request with good OAuth refresh token, client ID and client secret to the Zoom OAuth server.
  2. Zoom OAuth server appears to have processed the request successfully, and is sending a response back with the new OAuth token.
  3. But, my client code got a gateway timeout exception reading the response. So, I never got the new OAuth token and thus now only have an old OAuth token in storage.
  4. The result is that I cannot call any V2 API for the affect Zoom account, until an account Admin re-authorized my application.

As I’ve said before, this is not a good model for a background application that does not have any interaction. Additionally, the application is multi-tenant. So, the person that would have to re-authorize the application is a customer and not an internal user. Can’t be going to the customer and asking them to re-authorized our application without any reason (e.g. no new feature set).