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,
token: roomCredentials.token,
liveURL: roomCredentials.liveURL,
});When the Promise resolves, data is a SignalingTokenResult containing token and liveURL; it does not repeat roomID. Connect to the media engine only after obtaining a valid token, using the roomID supplied to this query.
Do not enter the media room without a valid token. Call this API again when fresh room credentials are required.
Was this page helpful?