Callbacks

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

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

Callback NameWhen TriggeredArkose Product Applicability
onReadyWhen API is loaded and configured.Arkose Detect
Arkose Protect
onErrorAt any point in a session when an internal Arkose API error occurs.Arkose Detect
Arkose Protect
onShowWhen a selector is pressed, but before a challenge is shown AND

When a challenge is closed but is then shown again.
Arkose Protect
onSuppressWhen a session is classified as not needing a challenge.Arkose Detect
Arkose Protect
onShownWhen a challenge is first shown. This can only trigger once per session.Arkose Protect
onCompletedWhen no challenge is needed OR

When a challenge is answered correctly.
Arkose Detect
Arkose Protect
onHideWhen a challenge is closed using ESC or its X button AND

After onCompleted triggers, whether a challenge was shown or not.
Arkose Detect (second situation only)
Arkose Protect (first and second situations)
onFailedWhen a challenge is failed more than a configured number of tries. Defaults to no limit value for the trigger.Arkose Protect
onResetWhen a challenge is programmatically reset OR

When a challenge is answered correctly.
Arkose Protect
onResizeWhen a challenge is shown AND

After onShown triggers.
Arkose Protect

What’s Next