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 ORWhen 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 ANDWhen 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 ANDWhen a challenge is closed and then shown again. | Enforcement |
onCompleted | When no challenge is needed ORWhen a challenge is answered correctly. | Detection Enforcement |
onHide | When 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) |
onFailed | When 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 |
onReset | When a challenge is programmatically reset ORWhen a challenge is answered correctly. | Enforcement |
onResize | When a challenge is shown ANDAfter onShown triggers. | Enforcement |