# OAuth 2.0 Token Refresh with Python

**URL:** <https://devforum.zoom.us/t/oauth-2-0-token-refresh-with-python/83594>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [February 22, 2023, 8:55pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-refresh-with-python/83594 "2023-02-22T20:55:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [February 23, 2023, 4:11pm UTC](https://devforum.zoom.us/t/oauth-2-0-token-refresh-with-python/83594/6 "2023-02-23T16:11:27Z")

</div>

Okay, I see. The first thing I’d recommend is that the OAuth flow is handled in your application. That way you can implement the logic for:

1. Retrieving the access token

2. Storing/caching it for the duration of its lifetime (60 mins)

3. Refreshing the token

Here is a post with instructions on handling OAuth flow with a Python application. Take a look and let us know if you have any questions:

> [@Zoom Oauth python example](https://devforum.zoom.us/t/zoom-oauth-python-example/78181/2):
>
> Hi, @asanford, Welcome to the Zoom Developer Platform – happy to help. Please see the below OAuth2 Python example script smiley #!/usr/bin/env python from flask import Flask, abort, request from uuid import uuid4 import requests import requests.auth import urllib CLIENT\_ID = "YOUR\_ZOOM\_CLIENT\_ID" # Fill this in with your client ID CLIENT\_SECRET = "YOUR\_ZOOM\_SECRET" # Fill this in with your client secret REDIRECT\_URI = "http://localhost:65010/zoom\_callback" app = Flask(\_\_name\_\_) @app.route…

---

_[View the full topic](https://devforum.zoom.us/t/oauth-2-0-token-refresh-with-python/83594)._
