SDKsWASMEnterprise
Get a call room token
Refresh room credentials by room ID with the WASM SDK.
When you already know roomID but need fresh credentials for joining the room, call signalingGetTokenByRoomID():
const { data: roomCredentials } =
await openimsdk.signalingGetTokenByRoomID(roomID);
await mediaEngine.join({
roomID: roomCredentials.roomID,
token: roomCredentials.token,
liveURL: roomCredentials.liveURL,
});When the Promise resolves, data is RtcInviteResults. For field descriptions, see Start a one-to-one call. Connect to the media engine only after obtaining a valid token and roomID.
A room token is a short-lived sensitive credential. Use it only in memory; do not write it to logs, URLs, analytics events, or persistent storage.
Was this page helpful?