Client API

Using the Arkose Client API

myArkose Object

The myArkose object that is provided when the Arkose Bot Manager API script (as installed in Client-Side Instructions) is loaded exposes a number of public functions that are listed below. Use these to help support specific your implementation requirements. One function that must ALWAYS be called is setConfig. This sets up the Client API e.g. callback functions.

MethodTypeDescription
myArkose.getConfigFunctionReturns the configuration object
myArkose.resetFunctionResets the current session for both detection and enforcement. This creates a new session.
myArkose.setConfigFunctionUpdates the configuration object.
myArkose.runFunctionTriggers the detection or enforcement API to classify the current session.
myArkose.versionStringReturns the API version (e.g. 2.0.0).

API Callbacks

The Client API provides callbacks that can be triggered during a session. These callbacks provide integration points that manage a user's journey based on your applications logic.

The following diagram and table show and specify the conditions that trigger a Client API callback. You need to write functions for what happens when each particular callback is triggered.

This diagram shows the API callbacks sequence, along with a brief description of what triggers each callback in that sequence position. Note that onShow and onHide can be triggered at two different sequence locations, and you must write their callback functions to handle both possibilities. Also note that a callback may not be triggered during a session. For example, if there are no internal Arkose API errors, onError is not be triggered.

See Callbacks for more information about the specific callback functions.


What’s Next