Using oauth app of market place in python script

Description
I have created a script to handle zoom recordings, but I want to create an zoom oauth app where user can install that app and python script can automatically use that generated access token.

Error
Automate the process of authorization and fetching of access token. As after every 1 hour oauth access token is expired.

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

Which Endpoint/s?
recordings, user

Hey @rahul.patel,

If you want to automate the process of user authorization, this should definitely be possible using our OAuth flow:

To clarify, requesting an OAuth access token (so that you can authenticate requests on behalf of a user to our recordings, users, etc. endpoints), consists of multiple requests.

First, the user needs to install the OAuth App and you need to retrieve a code. From there, you can automate the rest of the process outlined in the documentation above—requesting an access token from our /oauth endpoint, refreshing a token, sending a request to our Recordings endpoint, etc.

Here is an example of hitting our OAuth endpoint in Python:

import requests

url = "https://zoom.us/oauth/token?grant_type=authorization_code&code={code}&redirect_uri={yourOAuthAppsRedirectUri}"

payload = {}
headers = {
  'Authorization': 'Basic NnJFU2NHdU5UbGFOOThNM2NoVXNoQTpwMXhqS1dvNXhpVEt0aExpNDdEcVFMSzUzeE0zN0tQcw=='
}

response = requests.request("POST", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

Let me know if this helps!

Best,
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.