-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-to-server Oauth ? #152
Comments
Example of how to use it https://www.makeuseof.com/generate-server-to-server-oauth-zoom-meeting-link-python/ |
Hi, this is already built in. To generate credentials locally just run in your terminal: python -c "from pyzoom import oauth_wizard; oauth_wizard()" And follow the instructions. |
Ok, I read more carefully. We don't have support for s2s-oauth, only normal oauth. If you want you can make a PR to add it. |
Thanks, I've used it here, which other people might also like to use as a base 🙂 https://github.com/owen9825/zoom_attendance |
So basically we need something similar to this as one of the ways to initialise the ZoomClient? def get_access_token(account_id: str) -> Optional[str]:
# https://developers.zoom.us/docs/internal-apps/s2s-oauth/
client_id = os.getenv("ZOOM_CLIENT_ID")
client_secret = os.getenv("ZOOM_CLIENT_SECRET")
# https://www.makeuseof.com/generate-server-to-server-oauth-zoom-meeting-link-python/
data = {
"grant_type": "account_credentials",
"account_id": account_id,
"client_secret": client_secret,
}
headers = {"Host": "zoom.us"}
response = requests.post(
auth_token_url, auth=(client_id, client_secret), data=data, headers=headers
)
if not response.ok:
logger.warning(
"There was an error (%s) authenticating at %s: %s",
response.status_code,
response.url,
response.text,
)
return None
body = response.json()
return body.get("access_token") |
I forgot I had opened this, but we ended-up developing our own class for interfacing with Zoom. Here is the portion of the class code for getting the authorization headers:
Then it can be used, for example:
|
sorry, I've finished work on this. I don't wish to return to it and go through the implementation a 2nd time. All the best |
Hi,
The Zoom API supports what they call "Server-to-server Oauth", which does not seem to require a call back URL. Can this be supported ?
The text was updated successfully, but these errors were encountered: