Refresh token doesn't work

Hi all!
Refresh token doesn’t work
First getting refresh token:

 Uri: https://zoom.us/oauth/token 

 Content: grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzUxMiJ9.eyJ2ZXIiOiI2IiwiY2xpZW50SWQiOiI0MUdyaVR6VVF4NlQ0dHpkWndSTDVBIiwiY29kZSI6IldFOWhpODJCQzdfSnUzU3FURGZRWkswdXpLRkxQWm41QSIsImlzcyI6InVybjp6b29tOmNvbm5lY3Q6Y2xpZW50aWQ6NDFHcmlUelVReDZUNHR6ZFp3Ukw1QSIsImF1dGhlbnRpY2F0aW9uSWQiOiJlNDUwNzUwZWI3N2NlN2UwZWRlMDliYzI5MDE3YTI0ZiIsImVudiI6W251bGxdLCJ1c2VySWQiOiJKdTNTcVREZlFaSzB1ektGTFBabjVBIiwiZ3JvdXBOdW1iZXIiOjAsImF1ZCI6Imh0dHBzOi8vb2F1dGguem9vbS51cyIsImFjY291bnRJZCI6Il9JQU5HWk5vUjBxUWtxS1FjYTdEMEEiLCJuYmYiOjE1NzU1NzYwNTUsImV4cCI6MjA0ODYxNjA1NSwidG9rZW5UeXBlIjoicmVmcmVzaF90b2tlbiIsImlhdCI6MTU3NTU3NjA1NSwianRpIjoiZTc2OGU2OGEtYzFhOS00MjdjLTljMTAtMTUxMjY5ZGI4MjUxIiwidG9sZXJhbmNlSWQiOjB9.xN59JTVuMh_li9jMBUl3bVpdOKyRipr0mhNT3TinhfO4lfFRYOuoksMz3PvTNF6jv9DW4BAWNUh-pRJrHUuQZA&redirect_uri=https%3A%2F%2Fmy.site%2Fportal%2FZoomOAuth%2FConfirmRegistration
  • works
    1 min later :
    Uri: https://zoom.us/oauth/token

    Content: grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzUxMiJ9.eyJ2ZXIiOiI2IiwiY2xpZW50SWQiOiI0MUdyaVR6VVF4NlQ0dHpkWndSTDVBIiwiY29kZSI6IldFOWhpODJCQzdfSnUzU3FURGZRWkswdXpLRkxQWm41QSIsImlzcyI6InVybjp6b29tOmNvbm5lY3Q6Y2xpZW50aWQ6NDFHcmlUelVReDZUNHR6ZFp3Ukw1QSIsImF1dGhlbnRpY2F0aW9uSWQiOiJlNDUwNzUwZWI3N2NlN2UwZWRlMDliYzI5MDE3YTI0ZiIsImVudiI6W251bGxdLCJ1c2VySWQiOiJKdTNTcVREZlFaSzB1ektGTFBabjVBIiwiZ3JvdXBOdW1iZXIiOjAsImF1ZCI6Imh0dHBzOi8vb2F1dGguem9vbS51cyIsImFjY291bnRJZCI6Il9JQU5HWk5vUjBxUWtxS1FjYTdEMEEiLCJuYmYiOjE1NzU1NzYwNTUsImV4cCI6MjA0ODYxNjA1NSwidG9rZW5UeXBlIjoicmVmcmVzaF90b2tlbiIsImlhdCI6MTU3NTU3NjA1NSwianRpIjoiZTc2OGU2OGEtYzFhOS00MjdjLTljMTAtMTUxMjY5ZGI4MjUxIiwidG9sZXJhbmNlSWQiOjB9.xN59JTVuMh_li9jMBUl3bVpdOKyRipr0mhNT3TinhfO4lfFRYOuoksMz3PvTNF6jv9DW4BAWNUh-pRJrHUuQZA&redirect_uri=https%3A%2F%2Fmy.site%2Fportal%2FZoomOAuth%2FConfirmRegistration
    2019-12-05 20:05:Error while getting authentication token from Zoom.
    Response: {“reason”:“Invalid Token!”,“error”:“invalid_request”}

Hey @oleg,

Are you using the most recent refresh_token each time?

In your second request 1 min later, you are using the exact same refresh_token as in your first request. Each time you refresh, a new refresh token is returned and the prior one becomes invalid.

Thanks,
Tommy

I see, can I provide you c# code to check my request?

Hey @oleg,

Sure, make sure you also have a database that updates the refresh and access tokens each time you refresh.

Thanks,
Tommy