# Any authentication package for python

**URL:** <https://devforum.zoom.us/t/any-authentication-package-for-python/65294>\
**Category:** Authentication\
**Created:** [March 5, 2022, 5:17pm UTC](https://devforum.zoom.us/t/any-authentication-package-for-python/65294 "2022-03-05T17:17:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhi.zhang.unai](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zhi.zhang.unai/32/33326_2.png) [@zhi.zhang.unai](https://devforum.zoom.us/u/zhi.zhang.unai)\
**Post date:** [March 5, 2022, 5:17pm UTC](https://devforum.zoom.us/t/any-authentication-package-for-python/65294/1 "2022-03-05T17:17:24Z")

</div>

I am building an application which will help user to create meetings.  
In my application, I cache user’s access token and refresh token and use them when needing to create meeting on behalf of the user.  
There are quite a few steps before using the access token for an api call for meeting creation.

1. try the access token, if failed try to get new one with refresh\_token
2. if refresh token is expired, need to refresh refresh\_token, then get a new access token again  
Is there any python package we can use to streamline this without creating our own code?

---

<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:** [May 27, 2022, 9:27pm UTC](https://devforum.zoom.us/t/any-authentication-package-for-python/65294/2 "2022-05-27T21:27:41Z")

</div>

Welcome, @zhi.zhang.unai,

Welcome to the Developer Forum! Currently, we do not have any sample apps demonstrating the OAuth flow with python. However, it looks like several python OAuth libraries you can consider:

[https://oauth.net/code/python/](https://oauth.net/code/python/)

> **[oauthlib](https://pypi.org/project/oauthlib/)**
>
> A generic, spec-compliant, thorough implementation of the OAuth request-signing logic

---

<div class="post-metadata">

**Author:** ![hanneryyjaxxeso](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hanneryyjaxxeso/32/55310_2.png) [@hanneryyjaxxeso](https://devforum.zoom.us/u/hanneryyjaxxeso)\
**Post date:** [January 5, 2024, 12:32am UTC](https://devforum.zoom.us/t/any-authentication-package-for-python/65294/3 "2024-01-05T00:32:37Z")

</div>

> [@zhi.zhang.unai](#):
>
> I am building an application which will help user to create meetings.  
> In my application, I cache user’s access token and refresh token and use them when needing to create meeting on behalf of the user.  
> There are quite a few steps before using the access token for an api call for meeting creation.
> 
> 1. try the access token, if failed try to get new one with refresh\_token
> 2. if refresh token is expired, need to refresh refresh\_token, then get a new access token again  
> Is there any python package we can use to streamline this without creating our own code?

You can streamline this process using Python packages like `requests` or `oauthlib` , which offer functionalities to handle OAuth2 authentication, token management, and API calls seamlessly. The `oauthlib` library provides robust support for OAuth1 and OAuth2 protocols, [allowing you](https://packmysim.com/jazz-daily-karachi-offer/) to manage access tokens, refresh tokens, and the authentication flow efficiently. Similarly, `requests` is a versatile HTTP library that can handle OAuth2 authentication and perform API requests with access tokens. Both can simplify the token management process, reducing the need for manually handling token validation, refreshing, and obtaining new access tokens.
