Description
I’m not able to access the token through pyzoom. It was working perfectly fine before so I’m a bit confused. I checked the client ID and secret to see if they changed, but they didn’t. I even tried making a new app, but it didn’t work either.
Error
The error message I’m getting is Failed to refresh tokens: {response.status_code} {response.text}
How To Reproduce
Create a connection to Zoom’s API through pyzoom.
import os
from pyzoom import oauth_wizard, ZoomClient
client = ZoomClient(oauth_wizard(os.getenv('CLIENT_ID'), os.getenv('CLIENT_SECRET'))["access_token"])
It’ll redirect you to the redirect URI. Press “Allow”.
Hi @vtrinh , pyzoom is not a Zoom created product. On the disclaimer description it says “This library is not related to Zoom Video Communications, Inc. It’s an open-source project that aims to simplify working with this suddenly very popular service.” Please reach out to the creators for support.
If other community members see this and have familiarity, they are more than inclined to assist further here
From what I understand, the refresh token request requires an access token as part of the request body. Unfortunately, due to the nature of our setup, since we were in rapid testing we would request and immediately discard access tokens after one use. This means I do not have an access token from any previous attempts that I could potentially refresh.
You should be caching your refresh token supplied with the access token, and use the refresh token to refresh access token. Refresh tokens expire after 90 days. Please see the guidance here: OAuth for user authorized apps
Additionally, you do not need to re-auth each time you request an access token or refresh an access token.
Thank you for the follow up. Our original problem is still there: we cannot authorize any new tokens, and have no tokens to attempt a refresh on since we did not cache the refresh token before. The same error applies: “invalid grant”. Are there any other tips you can provide that would help with this immediate issue?
Hi @vtrinh , please try your conditions in the sample environment via postman from the link I shared. I am able to successfully grab a token. Click “overview” to see the documentation. If you’re able to generate a token in Postman, it’s like your code that needs to be reconfigured.