Callbacks

This table lists all the Client API callbacks, when each can be triggered, and which Arkose components each is relevant for (i.e. onShow is only triggered when an Enforcement Challenge is shown. Since our detection component does not have Enforcement Challenges, you only have to define a callback for onShow when using our enforcement component).

For how to associate a function definition with a callback, see Configuration Object.

Callback NameWhen TriggeredApplicable Component
onReadyWhen API is loaded and configured OR

When a challenge is programmatically reset after onReset triggers.
Detection
Enforcement
onErrorAt any point in a session when an internal Arkose API error occurs.Detection
Enforcement
onWarningAt any point in a session when an internal Arkose API warning is triggered.Detection
Enforcement
onShowWhen a selector is pressed, but before a challenge is shown AND

When a challenge is closed but is then shown again.
Enforcement
onSuppressWhen a session is classified as not needing a challenge.Detection
Enforcement
onShownWhen a challenge is initially shown AND

When a challenge is closed and then shown again.
Enforcement
onCompletedWhen no challenge is needed OR

When a challenge is answered correctly.
Detection
Enforcement
onHideWhen a challenge is closed using ESC or its X button OR

After onCompleted triggers OR

After onError triggers in Client API version earlier than 3.0.0 when session setup fails, whether a challenge was shown or not.
Detection (second and third situations only)

Enforcement (first, second and third situations)
onFailedWhen a challenge is failed more than a configured number of tries. Defaults to no limit value for the trigger.Enforcement
onResetWhen a challenge is programmatically reset OR

When a challenge is answered correctly.
Enforcement
onResizeWhen a challenge is shown AND

After onShown triggers.
Enforcement