Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Get room credentials

Use the Android SDK to retrieve fresh join credentials for a known room ID.

Copy

When you know the roomID but need new join credentials, call signalingGetTokenByRoomID().

OpenIMClient.getInstance().signalingManager.signalingGetTokenByRoomID(
    new OnBase<SignalingCertificate>() {
        @Override
        public void onSuccess(SignalingCertificate credentials) {
            // credentials provides the roomID, token, and liveURL for joining a media room.
        }

        @Override
        public void onError(int code, String error) {
            // code and error describe the failure.
        }
    },
    roomID
);

The success callback returns SignalingCertificate, which provides the token and liveURL required to join the audio/video room.

Connect the media engine with the returned roomID, token, and liveURL after obtaining valid credentials. Call this method again when the credentials expire.