Reusing authorization code for multiple requests

Description
I am trying to create a webpage on my website to allow me to create meetings via the Zoom API. Obviously the user shouldn’t need to request an authorization code each time in order to make the webpage work. How can I automate the process of requesting an authorization code to allow me to do it server side as part of a chain of API calls? Do I need to request a new auth code each time or can I skip this step somehow?

Error
Currently I can only use the authorization code once to request an access token. If I try to request another access token I get an error which is only resolved by generating a new authorization code.

Which App Type (OAuth / Chatbot / JWT / Webhook)?
Using OAuth

Which Endpoint/s?
Trying to implement https://api.zoom.us/v2/users/me/meetings but need to automate https://zoom.us/oauth/token? first

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. Get authorization code
  2. Use authorization code to get access token
  3. Try to repeat step 2 with the same authorization code

I am using PHP and cURL

Hi @anorman when implementing OAuth, you won’t need to store the authorization code; rather, you should store the current access tokens and the refresh tokens for the user. When the access token expires, use the current refresh token to request a new access token.

1 Like