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 Name

When Triggered

Applicable Component

onReady

When API is loaded and configured OR

When a challenge is programmatically reset after onReset triggers.

Detection
Enforcement

onError

At any point in a session when an internal Arkose API error occurs.

Detection
Enforcement

onWarning

At any point in a session when an internal Arkose API warning is triggered.

Detection
Enforcement

onShow

When a selector is pressed, but before a challenge is shown AND

When a challenge is closed but is then shown again.

Enforcement

onSuppress

When a session is classified as not needing a challenge.

Detection
Enforcement

onShown

When a challenge is initially shown AND

When a challenge is closed and then shown again.

Enforcement

onCompleted

When no challenge is needed OR

When a challenge is answered correctly.

Detection
Enforcement

onHide

When 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)

onFailed

When a challenge is failed more than a configured number of tries. Defaults to no limit value for the trigger.

Enforcement

onReset

When a challenge is programmatically reset OR

When a challenge is answered correctly.

Enforcement

onResize

When a challenge is shown AND

After onShown triggers.

Enforcement