Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network optimized for real-time web and mobile-to-mobile applications.

  • The IRtcEngine class is the entry point of the Agora RTC SDK providing API methods for applications to quickly start a voice/video communication or interactive broadcast.
  • The AgoraCallback reports runtime events to the applications.
  • The AudioEffectManagerImpl class provides APIs that set the audio effects.
  • The AudioPlaybackDeviceManager class provides APIs that set the audio playback device, and retrieves the information of the audio playback device.
  • The AudioRecordingDeviceManager class provides APIs that set the audio recording device, and retrieves the information of the audio recording device.
  • The VideoDeviceManager class provides APIs that set the video recording device, and retrieves the information of the video recording device.
  • The MetadataObserver class provides APIs that register the MetadataObserver and report the status of the metadata.
  • The PacketObserver class provides APIs that register the PacketObserver and report the status of the audio packet.
  • The AudioRawDataManager class provides APIs that register the audio raw data observer and report the status of the audio raw data.
  • The VideoRawDataManager class provides APIs that register the video raw data observer and report the status of the video raw data.
  • The VideoSurface class provides APIs that set the video renderer type and the local/remote video.

Channel Management

Method Description
GetEngine Initializes the IRtcEngine.
Destroy Destroys all IRtcEngine resources.
SetChannelProfile Sets the channel profile in a live broadcast.
SetClientRole Sets the role of the user in a live broadcast.
JoinChannel Allows a user to join a channel.
JoinChannelByKey Allows a user to join a channel with token.
SwitchChannel Switches to a different channel in a live broadcast.
LeaveChannel Allows a user to leave a channel.
RenewToken Renews the Token.
EnableWebSdkInteroperability Enables interoperability with the Agora Web SDK.
GetConnectionState Gets the current connection state of the SDK.

Channel Events

Event Description
OnConnectionStateChangedHandler Occurs when the connection state between the SDK and the server changes.
OnJoinChannelSuccessHandler Occurs when a user joins a channel.
OnReJoinChannelSuccessHandler Occurs when a user rejoins the channel.
OnLeaveChannelHandler Occurs when a user leaves the channel.
OnClientRoleChangedHandler Occurs when the user role switches in a live broadcast.
OnUserJoinedHandler Occurs when a remote user (Communication)/ host (Live Broadcast) joins the channel.
OnUserOfflineHandler Occurs when a remote user (Communication)/ host (Live Broadcast) leaves the channel.
OnNetworkTypeChangedHandler Occurs when the local network type changes.
OnConnectionLostHandler Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.
OnTokenPrivilegeWillExpireHandler Occurs when the token expires in 30 seconds.
OnRequestTokenHandler Occurs when the token expires.

Audio Management

Method Description
EnableAudio Enables the audio module.
DisableAudio Disables the audio module.
SetAudioProfile Sets the audio parameters and application scenarios.
AdjustRecordingSignalVolume Adjusts the recording volume.
AdjustPlaybackSignalVolume Adjusts the playback volume of all remote users.
EnableLocalAudio Enables/Disables the local audio sampling.
MuteLocalAudioStream Stops/Resumes sending the local audio stream.
MuteRemoteAudioStream Stops/Resumes receiving the audio stream from a specified remote user.
MuteAllRemoteAudioStreams Stops/Resumes receiving all remote users' audio streams.
SetDefaultMuteAllRemoteAudioStreams Stops/Resumes receiving all remote users' audio streams by default.

Audio Volume Indication

Method Description
EnableAudioVolumeIndication Enables the OnVolumeIndicationHandler callback at a set time interval to report on which users are speaking and the speakers' volume.
Event Description
OnVolumeIndicationHandler Reports which users are speaking, the speakers' volumes, and whether the local user is speaking.
OnActiveSpeakerHandler Reports which user is the loudest speaker.

Video Management

Method Description
EnableVideo Enables the video module.
EnableVideoObserver Enables the video observer.
DisableVideo Disables the video module.
DisableVideoObserver Disables the video observer.
SetVideoEncoderConfiguration Sets the video encoder configuration.
SetForUser Sets the local/remote video.
StartPreview Starts the local video preview before joining the channel.
StopPreview Stops the local video preview and disables video.
EnableLocalVideo Enables/Disables the local video capture.
MuteLocalVideoStream Stops/Resumes sending the local video stream.
MuteRemoteVideoStream Stops/Resumes receiving the video stream from a specified remote user.
MuteAllRemoteVideoStreams Stops/Resumes receiving all video stream from a specified remote user.
SetDefaultMuteAllRemoteVideoStreams Stops/Resumes receiving all remote users' video streams by default.

Audio Effect Playback

Method Description
GetEffectsVolume Gets the volume of the audio effects.
SetEffectsVolume Sets the volume of the audio effects.
SetVolumeOfEffect Sets the volume of a specified audio effect.
PlayEffect Plays a specified audio effect.
StopEffect Stops playing a specified audio effect.
StopAllEffects Stops playing all audio effects.
PreloadEffect Preloads a specified audio effect file into the memory.
UnloadEffect Releases a specified audio effect from the memory.
PauseEffect Pauses a specified audio effect.
PauseAllEffects Pauses all audio effects.
ResumeEffect Resumes playing a specified audio effect.
ResumeAllEffects Resumes playing all audio effects.
SetVoiceOnlyMode Sets the voice-only mode.
Event Description
OnAudioEffectFinishedHandler Occurs when the local audio effect playback finishes.

Voice Changer and Reverberation

Method Description
SetLocalVoiceChanger Sets the local voice changer option.
SetLocalVoiceReverbPreset Sets the preset local voice reverberation effect.
SetLocalVoicePitch Changes the voice pitch of the local speaker.
SetLocalVoiceEqualization Sets the local voice equalization effect.
SetLocalVoiceReverb Sets the local voice reverberation.

Sound Position Indication

Method Description
EnableSoundPositionIndication Enables/Disables stereo panning for remote users.
SetRemoteVoicePosition Sets the sound position and gain of a remote user.

Local Media Events

Event Description
OnLocalAudioStateChangedHandler Occurs when the local audio state changes.
OnLocalVideoStateChangedHandler Occurs when the local video state changes.
OnFirstLocalAudioFrameHandler Occurs when the first local audio frame is sent.
OnFirstLocalVideoFrameHandler Occurs when the first local video frame is rendered.

Remote Media Events

Event Description
OnRemoteAudioStateChangedHandler Occurs when the remote audio state changes.
OnRemoteVideoStateChangedHandler Occurs when the remote video state changes.
OnUserMutedAudioHandler Occurs when a remote user's audio stream playback pauses/resumes.
OnUserMuteVideoHandler Occurs when a remote user's video stream playback pauses/resumes.
OnFirstRemoteAudioFrameHandler Occurs when the first remote audio frame is received.
OnFirstRemoteAudioDecodedHandler Occurs when the SDK decodes the first remote audio frame for playback.
OnFirstRemoteVideoFrameHandler Occurs when the first remote video frame is rendered.

Statistics Events

After joining a channel, SDK triggers this group of callbacks once every two seconds.

Event Description
OnRtcStatsHandler Reports the statistics of the current call session.
OnNetworkQualityHandler Reports the network quality of each user.
OnLocalAudioStatsHandler Reports the statistics of the local audio stream.
OnLocalVideoStatsHandler Reports the statistics of the local video stream.
OnRemoteAudioStatsHandler Reports the statistics of the audio stream from each remote user/host.
OnRemoteVideoStatsHandler Reports the statistics of the video stream from each remote user/host.

Video Pre-process and Post-process

Method Description
SetBeautyEffectOptions Sets the image enhancement options.

Screen Capture

Method Description
StartScreenCaptureByDisplayId Shares the whole or part of a screen by specifying the display ID (for macOS only).
StartScreenCaptureByScreenRect Shares the whole or part of a screen by specifying the screen rect.
StartScreenCaptureByWindowId Shares the whole or part of a window by specifying the window ID.
SetScreenCaptureContentHint Sets the content hint for screen sharing.
UpdateScreenCaptureParameters Updates the screen sharing parameters.
UpdateScreenCaptureRegion Updates the screen sharing region.
StopScreenCapture Stops screen sharing.

Audio File Playback and Mixing

Method Description
StartAudioMixing Starts playing and mixing the music file.
StopAudioMixing Stops playing and mixing the music file.
PauseAudioMixing Pauses playing and mixing the music file.
ResumeAudioMixing Resumes playing and mixing the music file.
AdjustAudioMixingVolume Adjusts the volume during audio mixing.
AdjustAudioMixingPlayoutVolume Adjusts the volume of audio mixing for local playback.
AdjustAudioMixingPublishVolume Adjusts the volume of audio mixing for remote playback.
GetAudioMixingPlayoutVolume Gets the audio mixing volume for local playback.
GetAudioMixingPublishVolume Gets the audio mixing volume for publishing.
GetAudioMixingDuration Gets the duration (ms) of the music file.
GetAudioMixingCurrentPosition Gsts the playback position (ms) of the music file.
SetAudioMixingPosition Sets the playback position of the music file.
Event Description
OnAudioMixingStateChangedHandler Occurs when the state of the local user's audio mixing file changes.
OnRemoteAudioMixingBeginHandler Occurs when a remote user starts audio mixing.
OnRemoteAudioMixingEndHandler Occurs when a remote user finishes audio mixing.

CDN Publisher

This group of methods apply to Live Broadcast only.

Method Description
SetLiveTranscoding Sets the video layout and audio for CDN live.
AddPublishStreamUrl Adds a CDN stream address.
RemovePublishStreamUrl Removes a CDN stream address.
Event Description
OnRtmpStreamingStateChangedHandler Occurs when the state of the RTMP streaming changes.
OnTranscodingUpdatedHandler Occurs when the publisher's transcoding settings are updated.

Media Stream Relay Across Channels

This group of methods apply to Live Broadcast only.

Method Description
StartChannelMediaRelay Starts to relay media streams across channels.
UpdateChannelMediaRelay Updates the channels for media stream relay.
StopChannelMediaRelay Stops the media stream relay.
Event Description
OnChannelMediaRelayStateChangedHandler Occurs when the state of the media stream relay changes.
OnChannelMediaRelayEventHandler Reports events during the media stream relay.

Audio Routing Control

Method Description
SetDefaultAudioRouteToSpeakerphone Sets the default audio playback route (for Android and iOS only).
SetEnableSpeakerphone Enables/Disables the audio playback route to the speakerphone (for Android and iOS only).
IsSpeakerphoneEnabled Checks whether the speakerphone is enabled (for Android and iOS only).
Event Description
OnAudioRouteChangedHandler Occurs when the local audio route changes (for Android and iOS only).

In-ear Monitoring

Method Description
SetInEarMonitoringVolume Sets the volume of the in-ear monitor (for Android and iOS only).

Dual Video Stream Mode

Method Description
EnableDualStreamMode Enables/disables dual video stream mode.
SetRemoteVideoStreamType Sets the remote user’s video stream type received by the local user when the remote user sends dual streams.
SetRemoteDefaultVideoStreamType Sets the default video-stream type for the video received by the local user when the remote user sends dual streams.

Stream Fallback

This group of methods apply to Live Broadcast only.

Method Description
SetLocalPublishFallbackOption Sets the fallback option for the published video stream under unreliable network conditions.
SetRemoteSubscribeFallbackOption Sets the fallback option for the remote stream under unreliable network conditions.
SetRemoteUserPriority Prioritizes a remote user's stream.
Event Description
OnLocalPublishFallbackToAudioOnlyHandler

Occurs:

  • When the published media stream falls back to an audio-only stream due to poor network conditions.
  • When the published media stream switches back to the video after the network conditions improve.

OnRemoteSubscribeFallbackToAudioOnlyHandler

Occurs:

  • When the remote media stream falls back to audio-only due to poor network conditions.
  • When the remote media stream switches back to the video after the network conditions improve.

Pre-call Network Test

Method Description
StartEchoTest Starts an audio call test.
StopEchoTest Stops the audio call test.
EnableLastmileTest Enables the network connection quality test.
DisableLastmileTest Disables the network connection quality test.
StartLastmileProbeTest Starts the last-mile network probe test.
StopLastmileProbeTest Stops the last-mile network probe test.
Event Description
OnLastmileQualityHandler Reports the last mile network quality of the local user before the user joins the channel.
OnLastmileProbeResultHandler Reports the last-mile network probe result.

Custom Video Module

  • N/A

External Video Data (Push-mode only)

Method Description
SetExternalVideoSource Configures the external video source.
PushVideoFrame Pushes the external video frame.

External Audio Data (Push-mode only)

Method Description
SetExternalAudioSource Configures the external audio source.
PushAudioFrame Pushes the external audio frame.

External Audio Sink (Pull-mode only)

This group of methods are for Windows only.

Method Description
SetExternalAudioSink Sets the external audio sink.
PullAudioFrame Pulls the external audio frame.

Raw Audio Data

Method Description
RegisterAudioRawDataObserver Registers an audio frame observer object.
UnRegisterAudioRawDataObserver UnRegisters the audio raw data observer.
SetOnRecordAudioFrameCallback Listens for the OnRecordAudioFrameHandler delegate.
SetOnPlaybackAudioFrameCallback Listens for the OnPlaybackAudioFrameHandler delegate.
SetOnMixedAudioFrameCallback Listens for the OnMixedAudioFrameHandler delegate.
Event Description
OnRecordAudioFrameHandler Retrieves the recorded audio frame.
OnPlaybackAudioFrameHandler Retrieves the audio playback frame.
OnPlaybackAudioFrameBeforeMixingHandler Retrieves the audio frame of a specified user before mixing.
OnMixedAudioFrameHandler Retrieves the mixed recorded and playback audio frame.

Raw Video Data

Method Description
RegisterVideoRawDataObserver Registers a video frame observer object.
UnRegisterVideoRawDataObserver UnRegisters the video raw data observer.
SetOnCaptureVideoFrameCallback Listens for the OnCaptureVideoFrameHandler delegate.
SetOnRenderVideoFrameCallback Listens for the OnRenderVideoFrameHandler delegate.
Event Description
OnCaptureVideoFrameHandler Occurs when the camera captured image is received.
OnRenderVideoFrameHandler Processes the received image of the specified user (post-processing).

Media Metadata

This group of methods apply to Live Broadcast only.

Method Description
RegisterMediaMetadataObserver Registers a metadata observer.
UnRegisterMediaMetadataObserver Unregisters a metadata observer.
Event Description
OnGetMaxMetadataSizeHandler Occurs when the SDK requests the maximum size of the metadata.
OnReadyToSendMetadataHandler Occurs when the SDK is ready to receive and send metadata.
OnMediaMetaDataReceivedHandler Occurs when the local user receives the metadata.

Watermark

This group of methods apply to Live Broadcast only.

Method Description
AddVideoWatermark Adds a watermark image to the local video stream.
ClearVideoWatermarks Removes the added watermark image from the video stream.

Encryption

Method Description
SetEncryptionSecret Enables built-in encryption with an encryption password before joining a channel.
SetEncryptionMode Sets the built-in encryption mode.
RegisterPacketObserver Registers a packet observer.
UnRegisterPacketObserver UnRegisters the packet observer.

Audio Recorder

Method Description
StartAudioRecording Starts an audio recording on the client.
StopAudioRecording Stops an audio recording on the client.

Inject an Online Media Stream

This group of methods apply to Live Broadcast only.

Method Description
AddInjectStreamUrl Adds an online media stream to a live broadcast.
RemoveInjectStreamUrl Removes the online media stream from a live broadcast.
Event Description
OnStreamInjectedStatusHandler Reports the status of the injected online media stream.

Camera Control

Method Description
SwitchCamera Switches between front and rear cameras (for Android and iOS only).

Audio Device Manager

This group of methods are for Windows only.

Method Description
CreateAAudioPlaybackDeviceManager Creates an AudioPlaybackDeviceManager instance.
ReleaseAAudioPlaybackDeviceManager Releases an AudioPlaybackDeviceManager instance.
CreateAAudioRecordingDeviceManager Creates an AudioRecordingDeviceManager instance.
ReleaseAAudioRecordingDeviceManager Releases an AudioRecordingDeviceManager instance.
GetAudioPlaybackDeviceCount Retrieves the total number of the indexed audio playback devices in the system.
GetAudioRecordingDeviceCount Retrieves the total number of the indexed audio recording devices in the system.
GetAudioPlaybackDevice Retrieves the audio playback device associated with the index.
GetAudioRecordingDevice Retrieves the audio recording device associated with the index.
SetAudioPlaybackDevice Sets the audio playback device using the device ID.
SetAudioRecordingDevice Sets the audio recording device using the device ID.
StartAudioPlaybackDeviceTest Starts the test of the current audio playback device.
StopAudioPlaybackDeviceTest Stops the test of the current audio playback device.
StartAudioRecordingDeviceTest Starts the test of the current audio recording device.
StopAudioRecordingDeviceTest Stops the test of the current audio recording device.
SetAudioPlaybackDeviceVolume Sets the volume of the current audio playback device.
GetAudioPlaybackDeviceVolume Retrieves the volume of the current audio playback device.
SetAudioRecordingDeviceVolume Sets the volume of the current audio recording device.
GetAudioRecordingDeviceVolume Retrieves the volume of the current audio recording device.
SetAudioPlaybackDeviceMute Sets whether to stop audio playback.
IsAudioPlaybackDeviceMute Retrieves the status of the current audio playback device.
SetAudioRecordingDeviceMute Sets whether to stop audio recording.
IsAudioRecordingDeviceMute Gets the status of the current audio recording device.
GetCurrentPlaybackDevice Retrieves the device ID of the current audio playback device.
GetCurrentRecordingDevice Retrieves the device ID of the current audio recording device.
GetCurrentPlaybackDeviceInfo Retrieves the device information of the current audio playback device.
GetCurrentRecordingDeviceInfo Retrieves the device information of the current audio recording device.
Event Description
OnAudioDeviceStateChangedHandler Occurs when the audio device state changes.
OnAudioDeviceVolumeChangedHandler Occurs when the volume of the playback, microphone, or application changes.

Video Device Manager

This group of methods are for Windows only.

Method Description
CreateAVideoDeviceManager Creates an VideoDeviceManager instance.
ReleaseAVideoDeviceManager Releases an VideoDeviceManager instance.
GetVideoDeviceCount Retrieves the total number of the indexed video recording devices in the system.
GetVideoDevice Retrieves the video recording device associated with the index.
SetVideoDevice Sets the video recording device using the device ID.
StartVideoDeviceTest Starts the video recording device test.
StopVideoDeviceTest Stops the video recording device test.
GetCurrentVideoDevice Retrieves the device ID of the current video recording device.
Event Description
OnVideoDeviceStateChangedHandler Occurs when the video device state changes.

Stream Message

Method Description
CreateDataStream Creates a data stream.
SendStreamMessage Sends data stream messages to all users in a channel.
Event Description
OnStreamMessageHandler Occurs when the local user receives the data stream from the remote user within five seconds.
OnStreamMessageErrorHandler Occurs when the local user does not receive the data stream from the remote user within five seconds.

Miscellaneous Audio Control

Method Description
EnableLoopbackRecording Enables loopback recording (for macOS and Windows only).
SetAudioSessionOperationRestriction Sets the audio session’s operational restriction (for iOS only).

Miscellaneous Video Control

Method Description
SetCameraCapturerConfiguration Sets the camera capturer configuration.

Miscellaneous Methods

Method Description
SetGameFps Sets the video rendering frame rate.
EnableFilpTextureApply Enables/Disables the mirror mode when renders the Texture.
SetVideoSurfaceType Set the video renderer type.
SetEnable Starts/Stops the video rendering.
GetCallId Retrieves the current call ID.
Rate Allows the user to rate the call and is called after the call ends.
Complain Allows a user to complain about the call quality after a call ends.
GetSdkVersion Gets the SDK version number.
SetLogFile Specifies an SDK output log file.
SetLogFilter Sets the output log level of the SDK.
SetLogFileSize Sets the log file size (KB).
GetErrorDescription Retrieves the description of a warning or error code.

Miscellaneous Events

Event Description
OnSDKWarningHandler Reports a warning during SDK runtime.
OnSDKErrorHandler Reports an error during SDK runtime.
OnApiExecutedHandler Occurs when a method is executed by the SDK.

Customized Methods

Method Description
SetParameters Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.

Warning Code

Warning Code Description
WARN_INVALID_VIEW 8: The specified view is invalid. Specify a view when using the video call function.
WARN_INIT_VIDEO 16: Failed to initialize the video function, possibly caused by a lack of resources. The users cannot see the video while the voice communication is not affected.
WARN_PENDING 20: The request is pending, usually due to some module not being ready, and the SDK postponed processing the request.
WARN_NO_AVAILABLE_CHANNEL 103: No channel resources are available. Maybe because the server cannot allocate any channel resource.
WARN_LOOKUP_CHANNEL_TIMEOUT 104: A timeout occurs when looking up the channel. When joining a channel, the SDK looks up the specified channel. This warning usually occurs when the network condition is too poor for the SDK to connect to the server.
WARN_LOOKUP_CHANNEL_REJECTED DEPRECATED 105: The server rejects the request to look up the channel. The server cannot process this request or the request is illegal.Deprecated as of v2.4.1. Use CONNECTION_CHANGED_REJECTED_BY_SERVER(10) in the OnConnectionStateChangedHandler callback instead.
WARN_OPEN_CHANNEL_TIMEOUT 106: A timeout occurs when opening the channel. Once the specific channel is found, the SDK opens the channel. This warning usually occurs when the network condition is too poor for the SDK to connect to the server.
WARN_OPEN_CHANNEL_REJECTED 107: The server rejects the request to open the channel. The server cannot process this request or the request is illegal.
WARN_SWITCH_LIVE_VIDEO_TIMEOUT 111: A timeout occurs when switching to the live video.
WARN_SET_CLIENT_ROLE_TIMEOUT 118: A timeout occurs when setting the client role in the live broadcast profile.
WARN_OPEN_CHANNEL_INVALID_TICKET 121: The ticket to open the channel is invalid.
WARN_OPEN_CHANNEL_TRY_NEXT_VOS 122: Try connecting to another server.
WARN_AUDIO_MIXING_OPEN_ERROR 701: An error occurs in opening the audio mixing file.
WARN_ADM_RUNTIME_PLAYOUT_WARNING 1014: Audio Device Module: A warning occurs in the playback device.
WARN_ADM_RUNTIME_RECORDING_WARNING 1016: Audio Device Module: A warning occurs in the recording device.
WARN_ADM_RECORD_AUDIO_SILENCE 1019: Audio Device Module: No valid audio data is collected.
WARN_ADM_PLAYOUT_MALFUNCTION 1020: Audio Device Module: The playback device fails.
WARN_ADM_RECORD_MALFUNCTION 1021: Audio Device Module: The recording device fails.
WARN_ADM_IOS_CATEGORY_NOT_PLAYANDRECORD 1029: During a call, the audio session category should be set to AVAudioSessionCategoryPlayAndRecord, and IRtcEngine monitors this value. If the audio session category is set to other values, this warning code is triggered and IRtcEngine will forcefully set it back to AVAudioSessionCategoryPlayAndRecord.
WARN_ADM_RECORD_AUDIO_LOWLEVEL 1031: Audio Device Module: The recorded audio voice is too low.
WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL 1032: Audio Device Module: The playback audio voice is too low.
WARN_ADM_WINDOWS_NO_DATA_READY_EVENT 1040: Audio device module: An exception occurs with the audio drive. Solutions:
  • Disable or re-enable the audio device.
  • Re-enable your device.
  • Update the sound card drive.
WARN_APM_HOWLING 1051: Audio Device Module: Howling is detected.
WARN_ADM_GLITCH_STATE 1052: Audio Device Module: The device is in the glitch state.
WARN_ADM_IMPROPER_SETTINGS 1053: Audio Device Module: The underlying audio settings have changed.
WARN_ADM_WIN_CORE_NO_PLAYOUT_DEVICE 1323: Audio device module: No available playback device. Solution: Plug in the audio device.
WARN_ADM_WIN_CORE_IMPROPER_CAPTURE_RELEASE Audio device module: The capture device is released improperly. Solutions:Disable or re-enable the audio device.Re-enable your device.Update the sound card drive.
WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION 1610: Super-resolution warning: The original video dimensions of the remote user exceed 640 × 480.
WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION 1611: Super-resolution warning: Another user is using super resolution.
WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED 1612: The device is not supported.

Error Code

Error Code Description
ERR_OK 0: No error occurs.
ERR_FAILED 1: A general error occurs (no specified reason).
ERR_INVALID_ARGUMENT 2: An invalid parameter is used. For example, the specific channel name includes illegal characters.
ERR_NOT_READY 3: The SDK module is not ready. Possible solutions:
  • Check the audio device.
  • Check the completeness of the application.
  • Re-initialize the RTC engine.
ERR_NOT_SUPPORTED 4: The SDK does not support this function.
ERR_REFUSED 5: The request is rejected.
ERR_BUFFER_TOO_SMALL 6: The buffer size is not big enough to store the returned data.
ERR_NOT_INITIALIZED 7: The SDK is not initialized before calling this method.
ERR_NO_PERMISSION 9: No permission exists. This is for internal SDK use only, and it does not return to the application through any method or callback.
ERR_TIMEDOUT 10: An API method timeout occurs. Some API methods require the SDK to return the execution result, and this error occurs if the request takes too long (more than 10 seconds) for the SDK to process.
ERR_CANCELED 11: The request is canceled. This is for internal SDK use only, and it does not return to the application through any method or callback.
ERR_TOO_OFTEN 12: The method is called too often. This is for internal SDK use only, and it does not return to the application through any method or callback.
ERR_BIND_SOCKET 13: The SDK fails to bind to the network socket. This is for internal SDK use only, and it does not return to the application through any method or callback.
ERR_NET_DOWN 14: The network is unavailable. This is for internal SDK use only, and it does not return to the application through any method or callback.
ERR_NET_NOBUFS 15: No network buffers are available. This is for internal SDK internal use only, and it does not return to the application through any method or callback.
ERR_JOIN_CHANNEL_REJECTED 17: The request to join the channel is rejected. This error usually occurs when the user is already in the channel, and still calls the method to join the channel, for example, JoinChannelByKey.
ERR_LEAVE_CHANNEL_REJECTED 18: The request to leave the channel is rejected. This error usually occurs:
  • When the user has left the channel and still calls LeaveChannel to leave the channel. In this case, stop calling LeaveChannel.
  • When the user has not joined the channel and still calls LeaveChannel to leave the channel. In this case, no extra operation is needed.
ERR_ALREADY_IN_USE 19: Resources are occupied and cannot be reused.
ERR_ABORTED 20: The SDK gives up the request due to too many requests.
ERR_INIT_NET_ENGINE 21: In Windows, specific firewall settings can cause the SDK to fail to initialize and crash.
ERR_RESOURCE_LIMITED 22: The application uses too much of the system resources and the SDK fails to allocate the resources.
ERR_INVALID_APP_ID 101: The specified App ID is invalid. Please try to rejoin the channel with a valid App ID.
ERR_INVALID_CHANNEL_NAME 102: The specified channel name is invalid. Please try to rejoin the channel with a valid channel name.
ERR_TOKEN_EXPIRED DEPRECATED 109: Deprecated as of v2.4.1. Use CONNECTION_CHANGED_TOKEN_EXPIRED(9) in the OnConnectionStateChangedHandler callback instead. The token expired due to one of the following reasons:
  • Authorized Timestamp expired: The timestamp is represented by the number of seconds elapsed since 1/1/1970. The user can use the Token to access the Agora service within five minutes after the Token is generated. If the user does not access the Agora service after five minutes, this Token is no longer valid.
  • Call Expiration Timestamp expired: The timestamp is the exact time when a user can no longer use the Agora service (for example, when a user is forced to leave an ongoing call). When a value is set for the Call Expiration Timestamp, it does not mean that the token will expire, but that the user will be banned from the channel.
ERR_INVALID_TOKEN DEPRECATED 110: Deprecated as of v2.4.1. Use CONNECTION_CHANGED_INVALID_TOKEN(8) in the OnConnectionStateChangedHandler callback instead. The token is invalid due to one of the following reasons:
  • The App Certificate for the project is enabled in Console, but the user is still using the App ID. Once the App Certificate is enabled, the user must use a token.
  • The uid is mandatory, and users must set the same uid as the one set in the JoinChannelByKey method.
ERR_CONNECTION_INTERRUPTED 111: The internet connection is interrupted. This applies to the Agora Web SDK only.
ERR_CONNECTION_LOST 112: The internet connection is lost. This applies to the Agora Web SDK only.
ERR_NOT_IN_CHANNEL 113: The user is not in the channel when calling the SendStreamMessage or GetUserInfoByUserAccount method.
ERR_SIZE_TOO_LARGE 114: The size of the sent data is over 1024 bytes when the user calls the SendStreamMessage method.
ERR_BITRATE_LIMIT 115: The bitrate of the sent data exceeds the limit of 6 Kbps when the user calls the SendStreamMessage method.
ERR_TOO_MANY_DATA_STREAMS 116: Too many data streams (over 5 streams) are created when the user calls the CreateDataStream method.
ERR_STREAM_MESSAGE_TIMEOUT 117: The data stream transmission timed out.
ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED 119: Switching roles fail. Please try to rejoin the channel.
ERR_DECRYPTION_FAILED 120: Decryption fails. The user may have used a different encryption password to join the channel. Check your settings or try rejoining the channel.
ERR_CLIENT_IS_BANNED_BY_SERVER 123: The client is banned by the server.
ERR_WATERMARK_PARAM 124: Incorrect watermark file parameter.
ERR_WATERMARK_PATH 125: Incorrect watermark file path.
ERR_WATERMARK_PNG 126: Incorrect watermark file format.
ERR_WATERMARKR_INFO 127: Incorrect watermark file information.
ERR_WATERMARK_ARGB 128: Incorrect watermark file data format.
ERR_WATERMARK_READ 129: An error occurs in reading the watermark file.
ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH 130: Encryption is enabled when the user calls the AddPublishStreamUrl method (CDN live streaming does not support encrypted streams).
ERR_INVALID_USER_ACCOUNT 134: The user account is invalid.
ERR_PUBLISH_STREAM_CDN_ERROR 151: CDN related errors. Remove the original URL address and add a new one by calling the RemovePublishStreamUrl and AddPublishStreamUrl methods.
ERR_PUBLISH_STREAM_NUM_REACH_LIMIT 152: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones.
ERR_PUBLISH_STREAM_NOT_AUTHORIZED 153: The host manipulates other hosts' URLs. Check your app logic.
ERR_PUBLISH_STREAM_INTERNAL_SERVER_ERROR 154: An error occurs in Agora's streaming server. Call the addPublishStreamUrl method to publish the streaming again.
ERR_PUBLISH_STREAM_NOT_FOUND 155: The server fails to find the stream.
ERR_PUBLISH_STREAM_FORMAT_NOT_SUPPORTED 156: The format of the RTMP stream URL is not supported. Check whether the URL format is correct.
ERR_LOAD_MEDIA_ENGINE 1001: Fails to load the media engine.
ERR_START_CALL 1002: Fails to start the call after enabling the media engine.
ERR_START_CAMERA DEPRECATED 1003: Fails to start the camera. Deprecated as of v2.4.1. Use LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE(4) in the OnConnectionStateChangedHandler callback instead.
ERR_START_VIDEO_RENDER 1004: Fails to start the video rendering module.
ERR_ADM_GENERAL_ERROR 1005: A general error occurs in the Audio Device Module (no specified reason). Check if the audio device is used by another application, or try rejoining the channel.
ERR_ADM_JAVA_RESOURCE 1006: Audio Device Module: An error occurs in using the Java resources.
ERR_ADM_SAMPLE_RATE 1007: Audio Device Module: An error occurs in setting the sampling frequency.
ERR_ADM_INIT_PLAYOUT 1008: Audio Device Module: An error occurs in initializing the playback device.
ERR_ADM_START_PLAYOUT 1009: Audio Device Module: An error occurs in starting the playback device.
ERR_ADM_STOP_PLAYOUT 1010: Audio Device Module: An error occurs in stopping the playback device.
ERR_ADM_INIT_RECORDING 1011: Audio Device Module: An error occurs in initializing the recording device.
ERR_ADM_START_RECORDING 1012: Audio Device Module: An error occurs in starting the recording device.
ERR_ADM_STOP_RECORDING 1013: Audio Device Module: An error occurs in stopping the recording device.
ERR_ADM_RUNTIME_PLAYOUT_ERROR 1015: Audio Device Module: A playback error occurs. Check your playback device and try rejoining the channel.
ERR_ADM_RUNTIME_RECORDING_ERROR 1017: Audio Device Module: A recording error occurs.
ERR_ADM_RECORD_AUDIO_FAILED 1018: Audio Device Module: Fails to record.
ERR_ADM_INIT_LOOPBACK 1022: Audio Device Module: An error occurs in initializing the loopback device.
ERR_ADM_START_LOOPBACK 1023: Audio Device Module: An error occurs in starting the loopback device.
ERR_ADM_NO_PERMISSION 1027: Audio Device Module: No recording permission exists. Check if the recording permission is granted.
ERR_ADM_RECORD_AUDIO_IS_ACTIVE 1033: Audio device module: The device is occupied.
ERR_ADM_ANDROID_JNI_JAVA_RESOURCE 1101: Audio device module: A fatal exception occurs.
ERR_ADM_ANDROID_JNI_NO_RECORD_FREQUENCY 1108: Audio device module: The recording frequency is lower than 50. 0 indicates that the recording is not yet started. We recommend checking your recording permission.
ERR_ADM_ANDROID_JNI_NO_PLAYBACK_FREQUENCY 1109: The playback frequency is lower than 50. 0 indicates that the playback is not yet started. We recommend checking if you have created too many AudioTrack instances.
ERR_ADM_ANDROID_JNI_JAVA_START_RECORD 1111: Audio device module: AudioRecord fails to start up. A ROM system error occurs. We recommend the following options to debug:
  • Restart your App.
  • Restart your cellphone.
  • Check your recording permission.
ERR_ADM_ANDROID_JNI_JAVA_START_PLAYBACK 1112: Audio device module: AudioTrack fails to start up. A ROM system error occurs. We recommend the following options to debug:
  • Restart your App.
  • Restart your cellphone.
  • Check your playback permission.
ERR_ADM_ANDROID_JNI_JAVA_RECORD_ERROR 1115: Audio device module: AudioRecord returns error. The SDK will automatically restart AudioRecord.
ERR_ADM_ANDROID_OPENSL_CREATE_ENGINE DEPRECATED
ERR_ADM_ANDROID_OPENSL_CREATE_AUDIO_RECORDER DEPRECATED
ERR_ADM_ANDROID_OPENSL_START_RECORDER_THREAD DEPRECATED
ERR_ADM_ANDROID_OPENSL_CREATE_AUDIO_PLAYER DEPRECATED
ERR_ADM_ANDROID_OPENSL_START_PLAYER_THREAD DEPRECATED
ERR_ADM_IOS_INPUT_NOT_AVAILABLE 1201: Audio device module: The current device does not support audio input, possibly because you have mistakenly configured the audio session category, or because some other app is occupying the input device. We recommend terminating all background apps and re-joining the channel.
ERR_ADM_IOS_ACTIVATE_SESSION_FAIL 1206: Audio device module: Cannot activate the Audio Session.
ERR_ADM_IOS_VPIO_INIT_FAIL 1210: Audio device module: Fails to initialize the audio device, normally because the audio device parameters are wrongly set.
ERR_ADM_IOS_VPIO_REINIT_FAIL 1213: Audio device module: Fails to re-initialize the audio device, normally because the audio device parameters are wrongly set.
ERR_ADM_IOS_VPIO_RESTART_FAIL 1214: Fails to re-start up the Audio Unit, possibly because the audio session category is not compatible with the settings of the Audio Unit.
ERR_ADM_IOS_SESSION_SAMPLERATR_ZERO DEPRECATED
ERR_ADM_WIN_CORE_INIT 1301: Audio device module: An audio driver abnomality or a compatibility issue occurs. Solutions: Disable and restart the audio device, or reboot the system.
ERR_ADM_WIN_CORE_INIT_RECORDING 1303: Audio device module: A recording driver abnomality or a compatibility issue occurs. Solutions: Disable and restart the audio device, or reboot the system.
ERR_ADM_WIN_CORE_INIT_PLAYOUT 1306: Audio device module: A playout driver abnomality or a compatibility issue occurs. Solutions: Disable and restart the audio device, or reboot the system.
ERR_ADM_WIN_CORE_INIT_PLAYOUT_NULL 1307: Audio device module: No audio device is available. Solutions: Plug in a proper audio device.
ERR_ADM_WIN_CORE_START_RECORDING 1309: Audio device module: An audio driver abnomality or a compatibility issue occurs. Solutions: Disable and restart the audio device, or reboot the system.
ERR_ADM_WIN_CORE_CREATE_REC_THREAD 1311: Audio device module: Insufficient system memory or poor device performance. Solutions: Reboot the system or replace the device.
ERR_ADM_WIN_CORE_CAPTURE_NOT_STARTUP 1314: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_CORE_CREATE_RENDER_THREAD 1319: Audio device module: Insufficient system memory or poor device performance. Solutions: Reboot the system or replace the device.
ERR_ADM_WIN_CORE_RENDER_NOT_STARTUP 1320: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Replace the device.
ERR_ADM_WIN_CORE_NO_RECORDING_DEVICE 1322: Audio device module: No audio sampling device is available. Solutions: Plug in a proper recording device.
ERR_ADM_WIN_CORE_NO_PLAYOUT_DEVICE 1323: Audio device module: No audio playout device is available. Solutions: Plug in a proper playback device.
ERR_ADM_WIN_WAVE_INIT 1351: Audio device module: An audio driver abnormality or a compatibility issue occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_INIT_RECORDING 1353: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_INIT_MICROPHONE 1354: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_INIT_PLAYOUT 1355: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_INIT_SPEAKER 1356: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_START_RECORDING 1357: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_WIN_WAVE_START_PLAYOUT 1358: Audio device module: An audio driver abnormality occurs. Solutions:
  • Disable and then re-enable the audio device.
  • Reboot the system.
  • Upgrade your audio card driver.
ERR_ADM_NO_RECORDING_DEVICE 1359: Audio Device Module: No recording device exists.
ERR_ADM_NO_PLAYOUT_DEVICE 1360: Audio Device Module: No playback device exists.
ERR_VDM_CAMERA_NOT_AUTHORIZED 1501: Video Device Module: The camera is unauthorized.
ERR_VDM_WIN_DEVICE_IN_USE DEPRECATED 1502: Video Device Module: The camera in use. Deprecated as of v2.4.1. Use LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY(3) in the OnConnectionStateChangedHandler callback instead.
ERR_VCM_UNKNOWN_ERROR 1600: Video Device Module: An unknown error occurs.
ERR_VCM_ENCODER_INIT_ERROR 1601: Video Device Module: An error occurs in initializing the video encoder.
ERR_VCM_ENCODER_ENCODE_ERROR 1602: Video Device Module: An error occurs in encoding.
ERR_VCM_ENCODER_SET_ERROR 1603: Video Device Module: An error occurs in setting the video encoder.