Skip to main content
setUserData(data) Associates arbitrary custom data with the local participant and syncs it to all other participants. The data is stored in the userData property of the local participant’s DailyParticipant object and replaces any previously set value. A participant can only set their own userData — not another participant’s.
Updates are rate limited. The local copy of userData is updated immediately, but propagation to other participants is throttled. All participants are guaranteed to converge on the same final value.

Parameters

data
unknown
required
Any JSON-serializable value with a max payload size of 4KB. Pass undefined to remove userData from the participant object entirely.

Return value

Returns a Promise that resolves to { userData: unknown } — the value that was set.

Custom avatar in Daily Prebuilt

Setting an avatar key displays a custom image on the participant’s muted tile and in the People tab. The URL must be publicly accessible.
call.setUserData({ avatar: 'https://example.com/avatar.jpg' });
Video call participant tile showing a custom avatar image

Examples

Custom application state

call.setUserData({ hasHandRaised: true });

Reading userData

const local = call.participants()['local'];
console.log(local.userData);

const remote = call.participants()[participantSessionId];
console.log(remote.userData);

See also