is the room token that the backend generates for t...
# ask-ai
c
is the room token that the backend generates for the frontend static? or does it change each time i call it?
Copy code
@app.route('/getToken')
def getToken():
  token = api.AccessToken(os.getenv('LIVEKIT_API_KEY'), os.getenv('LIVEKIT_API_SECRET')) \
    .with_identity("identity") \
    .with_name("my name") \
    .with_grants(api.VideoGrants(
        room_join=True,
        room="my-room",
    ))
  return token.to_jwt()
t
Thanks for reaching out, Faraz. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey! Just so you know, the room tokens that LiveKit’s backend creates are dynamic—they change every time they’re generated. Each token is made with specific permissions tailored for a particular room and participant, which helps keep everything unique and secure. Sources: Authentication Examples | livekit/livekit_composite | DeepWiki | Transcription Applications | livekit/livekit_composite | DeepWiki