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 ORWhen 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 ANDWhen 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 ANDWhen a challenge is closed and then shown again.Enforcement
onCompletedWhen no challenge is needed ORWhen a challenge is answered correctly.Detection
Enforcement
onHideWhen a challenge is closed using ESC or its X button ORAfter onCompleted triggers ORAfter 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 cannot proceed due to exhausted configuration thresholds. This occurs when retry attempts are exceeded (defaults to unlimited) or PoW action is block.Enforcement
onResetWhen a challenge is programmatically reset ORWhen a challenge is answered correctly.Enforcement
onResizeWhen a challenge is shown ANDAfter onShown triggers.Enforcement