many-fall-81099
08/03/2025, 9:03 PMtall-airline-16756
08/03/2025, 9:03 PMtall-airline-16756
08/03/2025, 9:03 PMmany-fall-81099
08/03/2025, 9:04 PMtall-airline-16756
08/03/2025, 9:05 PMapi.AccessToken to create a token with all the right permissions (like room_join, can_publish, can_subscribe, and so on).
• The to_jwt() method then turns that token into a JWT string.
2. URL Construction:
• The URL gets built using your token and LiveKit URL, which is then passed to meet.livekit.io so you can see everything in action.
If anything feels off or you want me to walk through any part again, just give me a shout—I’m here to help!many-fall-81099
08/03/2025, 9:07 PMtall-airline-16756
08/03/2025, 9:08 PMAccessToken class. Make sure to include the necessary permissions like room_join, can_publish, and can_subscribe.
2. Connect the Participant:
• Use the token you generated to connect the participant to the room. You can do this through the LiveKit SDK or by sharing the token in a URL for meet.livekit.io.
Here’s an example to help you out:
from livekit import api
# Generate token for the new participant
token = api.AccessToken(settings.livekit_api_key, settings.livekit_api_secret) \
.with_identity("new-participant") \
.with_name("New Participant") \
.with_grants(api.VideoGrants(
room_join=True,
room="room_name",
can_publish=True,
can_subscribe=True,
)).to_jwt()
# Build the URL for <http://meet.livekit.io|meet.livekit.io>
url = f"<https://meet.livekit.io/custom?liveKitUrl={settings.livekit_url}&token={token}>"
print(url)
Just share this URL with your new participant, and they’ll be all set to join the room. If you have any questions or need a hand, feel free to ask!