SDKsAndroidEnterprise
Get call room token
Retrieve or refresh access credentials for an active calling room by room ID using signalingGetTokenByRoomID().
When the client knows the roomID but needs to acquire or refresh media room access tokens, fetch updated credentials using signalingGetTokenByRoomID():
Code example
OpenIMClient.getInstance().signalingManager.signalingGetTokenByRoomID(
new OnBase<SignalingCertificate>() {
@Override
public void onSuccess(SignalingCertificate credentials) {
// credentials provides roomID, token, and liveURL to connect to the media room.
}
@Override
public void onError(int code, String error) {
// code and error describe the failure.
}
},
roomID
);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base | OnBase<SignalingCertificate> | Yes | Callback delivering the asynchronous operation result. |
roomID | String | Yes | Target call room identifier. |
Return value
The successful callback returns a SignalingCertificate object containing:
roomID: Unique global identifier of the call room.token: Authentication token used to join the media room.liveURL: Media server endpoint URL.busyLineUserIDList: List of busy users.
Once valid credentials are received, connect to your media engine. If credentials expire during reconnection or extended waiting, call this method again to refresh them.
Was this page helpful?