{'code': 124, 'message': 'Invalid access token.'}

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')


Hey @Longvu2000,

Have you tried leveraging one of the existing libraries on https://jwt.io? You can also grab a pre-generated token directly from our Marketplace UI, from within your JWT app.

Thanks,
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.