Giter VIP home page Giter VIP logo

Comments (13)

prschmid avatar prschmid commented on June 8, 2024 1

PyJWT seems to be your issue. If you take a look at the requirements file, you should be using PyJWT 2.0.1.

from zoomus.

prschmid avatar prschmid commented on June 8, 2024

Hi @lrhazi . Sorry to hear about your troubles!

What I've seen happen to folks in the past is that it's caused by an older version of PyJWT that was causing the issue. If you are sure that is not the culprit, have you tried to manually make requests to the Zoom API from that server?

from zoomus.

lrhazi avatar lrhazi commented on June 8, 2024

Thanks @prschmid I am pretty sure am using same python version and same pip packages, but I will try to force rebuilds of the containers.

I tested with curl, using a token generated from my python script as follows:

print(f"Token: {client.config['token']}")

and it works:

[root@69981eb9a60f zoom]# curl --header "Content-Type: application/json" --header "Authorization: Bearer $TOK" --request POST --data '{"topic":"xyz","type":1}'  https://api.zoom.us/v2/users/me/meetings
{"uuid":"BV8GlLhtTUKGovrlp4Y1sg==","id":....

from zoomus.

lrhazi avatar lrhazi commented on June 8, 2024

Not sure if this helps but FYI, this prints Invalid access token error, then the curl runs successfully printing list of users...

from zoomus import ZoomClient
import json
client = ZoomClient('<key>','<secret>')

user_list_response = client.user.list()
user_list = json.loads(user_list_response.content)
print(user_list)

token = client.config['token']

import subprocess
subprocess.call([
    "curl", 
    "--header",f"""Authorization: Bearer {token.decode("utf-8") }""",
    "https://api.zoom.us/v2/users"
    ])

from zoomus.

mfldavidson avatar mfldavidson commented on June 8, 2024

What version of PyJWT and what version of zoomus are you using, @lrhazi ? I have also seen this error in the same situations that @prschmid described.

from zoomus.

lrhazi avatar lrhazi commented on June 8, 2024
[root@69981eb9a60f zoom]# 
[root@69981eb9a60f zoom]# python3 -V
Python 3.6.8
[root@69981eb9a60f zoom]# pip3 list | grep -i jw
PyJWT (1.7.1)
[root@69981eb9a60f zoom]# 

from zoomus.

lrhazi avatar lrhazi commented on June 8, 2024
[root@69981eb9a60f zoom]# pip3 list | grep -i zoom
zoomus (1.1.6)
[root@69981eb9a60f zoom]#

from zoomus.

mfldavidson avatar mfldavidson commented on June 8, 2024

If you'd like more info on why it's important to bump to 2.0.1 you can take a look at #157

from zoomus.

lrhazi avatar lrhazi commented on June 8, 2024

Thanks guys. will upgrade PyJWT.

from zoomus.

cterrile avatar cterrile commented on June 8, 2024

Hello there, I'm having the same issue-
when I initialize the ZoomClient:

client = ZoomClient(KEY,SECRET)
type(client.config['token'])
>"bytes"

After refreshing the JWT token:

client.refresh_token()
type(client.config['token'])
>"tuple"

I'm also on PyJWT 2.0.1

from zoomus.

mfldavidson avatar mfldavidson commented on June 8, 2024

Well that's new. That SOUNDS like you're on PyJWT 1.7 but you're sure you're on 2.0.1? Just for reference what version of zoomus?

from zoomus.

cterrile avatar cterrile commented on June 8, 2024

ah sorry you are correct! I read the installed versions from the wrong virtual env. Updating that env has fixed the errors. Thanks!

from zoomus.

prschmid avatar prschmid commented on June 8, 2024

Glad we were able to get everyone sorted! Closing this issue off for now. Happy coding.

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.