from livekit import AccessToken def generate_token(api_key, api_secret, identity="user", room="default"): at = AccessToken(api_key, api_secret, identity) at.add_grant({ "roomJoin": True, "room": room, }) return at.to_jwt()