Giter VIP home page Giter VIP logo

Comments (5)

prschmid avatar prschmid commented on June 2, 2024

Hi @MinistrBob!

The problem is that there is a slight error in the documentation which was fixed up on the develop branch but not on yet on master. Please see #2

from zoomus.

MinistrBob avatar MinistrBob commented on June 2, 2024

I do that:
`from zoomus import ZoomClient
import json

client = ZoomClient('nlPuETI4SNCVK7r5Lkl8EQ', 'gluuFR42imJ96VFpkmy1Yve0DBGeHUwwBZDG')

for user in json.loads(client.user.list().content)['users']:
user_id = user['id']
print(client.meeting.list(host_id=user_id))`

Anyway error:
`C:\MyGit\GivinToolsPython\env\Scripts\python.exe C:/MyGit/GivinToolsPython/zoomtest.py
Traceback (most recent call last):
File "C:/MyGit/GivinToolsPython/zoomtest.py", line 6, in
for user in json.loads(client.user.list().content)['users']:
KeyError: 'users'

Process finished with exit code 1`

If I run code in debug, when getting client.user.list().content = b'{"code":124,"message":"Invalid access token."}'

Where should I get API_KEY & API_SECRET ? I get it in zoom profile (see.picture)

image

from zoomus.

MohsenWaleed avatar MohsenWaleed commented on June 2, 2024

Hi @MinistrBob @prschmid

I'm getting the same error, and my syntax is correct but I keep getting: Invalid access token.

How you solve it?

from zoomus.

MinistrBob avatar MinistrBob commented on June 2, 2024

(Unfortunately, I can’t insert screenshots here :( )
You need to use JWT authorization (I use this one; here it’s enough to have API_KEY and API_SECRET to fulfill API requests).

Create an application in the Zoom development center with JWT authorization - https://marketplace.zoom.us/user/build

In the application itself, on the App Credentials tab, there are API_KEY and API_SECRET so they are used

Further I use zoomus here is an example code.

from zoomus import ZoomClient
import json

#client = ZoomClient('API_KEY', 'API_SECRET')
client = ZoomClient('7dtr8NY67777777770TQnfeQ', 'TyAcDcUBO2777777777Q71vAsOv')

print(client.user.list().content)
print(json.loads(client.user.list().content))
print(json.loads(client.user.list().content)['users'])
print("="*60)
for user in json.loads(client.user.list().content)['users']:
    print(user)
    user_id = user['id']
    print(client.meeting.list(host_id=user_id))

It would be great if it were in README.MD zoomus

from zoomus.

MohsenWaleed avatar MohsenWaleed commented on June 2, 2024

Many Thanks for your reply @MinistrBob. It's very helpful.

from zoomus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.