from twilio.jwt.access_token import AccessToken from twilio.jwt.access_token.grants import VideoGrant import os token = AccessToken( os.environ["TWILIO_ACCOUNT_SID"], os.environ["TWILIO_API_KEY"], os.environ["TWILIO_API_SECRET"], identity="test_user" ) token.add_grant(VideoGrant(room="test_room")) print(token.to_jwt())