Hi everyone,
I am strugling with the error: {‘code’: 124, ‘message’: ‘Invalid access token.’} while trying to generate Token using the below code:
def
generateToken():
token = jwt.encode(
# Create a payload of the token containing
# API Key & expiration time
{'iss': API_KEY, 'exp': time() + 5000},
# Secret used to generate token signature
API_SEC,
# Specify the hashing alg
algorithm='HS256'
)
return token
def createMeeting():
headers = {'authorization': 'Bearer %s' % generateToken(),
'content-type': 'application/json'}
r = requests.post(f'https://api.zoom.us/v2/users/me/meetings',headers=headers, data=json.dumps(meetingdetails))
print("\n creating zoom meeting ... \n")
y = json.loads(r.text)
print(y)
join_URL = y["join_url"]
meetingPassword = y["password"]
print(
f'\n here is your zoom meeting link {join_URL} and your \
password: "{meetingPassword}"\n')