big-school-62939
03/26/2026, 6:06 PMtall-airline-16756
03/26/2026, 6:06 PMtall-airline-16756
03/26/2026, 6:07 PMcanUpdateOwnMetadata: true in the VideoGrant. This cannot be set from the Unity client.
What to do (server-side):
1. When creating the JWT access token, add a VideoGrant that includes:
◦ room (the room name) if you want to scope the grant
◦ roomJoin: true (so the participant can join)
◦ canUpdateOwnMetadata: true (this enables updating their own metadata)
Example (Node.js):
import { AccessToken, VideoGrant } from 'livekit-server-sdk';
const at = new AccessToken('api-key', 'secret-key', { identity: 'user123' });
const videoGrant = new VideoGrant({
room: 'my-room',
roomJoin: true,
canUpdateOwnMetadata: true,
});
at.addGrant(videoGrant);
const token = await at.toJwt();
Client (Unity) notes:
• The Unity client uses the JWT you generated to connect. Once connected with a token that includes canUpdateOwnMetadata, the participant can call the client SDK method to update their metadata (methods vary by SDK version—look for setMetadata() / setAttributes() or equivalent in your Unity SDK).
• If the token lacks canUpdateOwnMetadata, attempts to update metadata will be rejected by the server.
If you’d like, tell me:
• Which server language you’re using (Node, Go, Python, etc.) and I’ll provide a concrete token-generation snippet for that language.
• Which Unity SDK version or method name you’re using so I can point to the exact client call to update metadata. Sources: Server-side | livekit/livekit_composite | DeepWiki | client-sdk-unity | livekit/livekit_composite | DeepWiki, with interactive elementsbig-school-62939
03/26/2026, 8:19 PMtall-airline-16756
03/26/2026, 8:19 PMcanUpdateOwnMetadata: true the participant will be allowed to update their own metadata after connecting.
Key points:
• Permissions are enforced by the token presented when the client connects. The server does not care whether the token was also used to create the room — only the grants inside the token matter.
• Include canUpdateOwnMetadata: true in the VideoGrant when you generate the token used by the Unity client.
• Once the Unity client connects with that token, it can call the client SDK method to update its metadata (e.g., setMetadata() / setAttributes() depending on your Unity SDK version).
If you want, tell me:
• Which server language you’re using (Node, Go, Python, etc.) so I can give a concrete code snippet for generating that token.
• Which Unity SDK method/version you have, and I’ll point to the exact client call to update metadata., with interactive elements