Trial test¶
If you want to get Alice Onboarding up and running without having to configure your server this is your place. We will provide you the necessary tools to deploy and test Alice Onboarding without the need for integration in your backend.
To do this, the Alice Onboarding Sandbox will be in charge of the authentication management and backend operations of Alice Onboarding. It also serves as an example of a simple backend and a starting point for you to integrate and deploy Alice Onboarding.
The sandbox is a service intended to substitute your backend when creating users and obtaining their USER_TOKENs
.
Consequently, you can inject the token into the client-side SDK and forget about integrating anything in your backend.
The TRIAL_TOKEN
is a temporary token for testing the technology in a development/testing environment.
See also
To obtain the TRIAL_TOKEN
please check your credentials or contact support.es@alicebiometrics.com
Authentication flow¶
The following diagram explains Sandbox’s authentication flow.

The in-app Sandbox manager is fed by the
TRIAL_TOKEN
provided within your credentials.The in-app Sandbox manager authenticates against the Alice Onboarding Sandbox service.
The Alice Onboarding Sandbox service associates an email with a
user_id
, creates a user, and returns itsUSER_TOKEN
.The in-app Sandbox manager receives the
USER_TOKEN
. Now the Alice Onboarding Client SDK is ready to operate against the Alice Onboarding API.The client SDK uses the
USER_TOKEN
to upload selfies, documents, and other user operations.
In-App sandbox manager¶
For every client-side SDK, we provide you an in-app sandbox manager so you can easily get the USER_TOKEN
from the Sandbox.
Please check the following table and code snippets.
SDK |
|
---|---|
iOS |
Use the |
Android |
Use the |
React Native |
Add our React Native component to your application |
HTML + JS |
Use the |
let trialToken = "<ADD-YOUR-TRIAL-TOKEN-HERE>"
let userInfo = UserInfo(email: email, // required
firstName: firstName, // optional
lastName: lastName) // optional
let authenticator = TrialAuthenticator(trialToken: trialToken, userInfo: userInfo)
authenticator.execute { result in
switch result {
case .success(let userToken):
// Configure Alice Onboarding with the OnboardingConfig
// Then Run the Alice Onboarding Flow
case .failure(let error):
// Inform the user about Authentication Errors
}
}
val trialToken = "<ADD-YOUR-TRIAL-TOKEN-HERE>"
val userInfo = UserInfo(email = email, // required
firstName = firstName, // optional
lastName = lastName) // optional
val authenticator = TrialAuthenticator(trialToken = trialToken, userInfo = userInfo)
authenticator.execute { response ->
when (response) {
is Response.Success -> {
// Configure Alice Onboarding with the OnboardingConfig
// Then Run the Alice Onboarding Flow
}
is Response.Failure -> {
// Inform the user about Authentication Errors
}
}
}
import { getUserTokenWithSandbox, runOnboarding } from 'aliceonboarding-reactnative';
getUserTokenWithSandbox(this.state.sandboxToken, this.state.email, (userToken) => {
const ONBOARDING_CONFIG = {
"stages": [
{"stage": "addSelfie"},
{"stage": "addDocument", "type": "idcard"},
]
}
runOnboarding(userToken, ONBOARDING_CONFIG , (result) => {
Alert.alert("Result", result)
console.log(result)
} , (error) => {
Alert.alert("Error", error)
console.log(error)
}, (cancel) => {
Alert.alert("Cancel", cancel)
console.log(cancel)
})
})
let trialToken = "<ADD-YOUR-TRIAL-TOKEN-HERE>";
let userInfo = new aliceonboarding.UserInfo(email: email, // required
firstName: firstName, // optional
lastName: lastName); // optional
let authenticator = new aliceonboarding.TrialAuthenticator(trialToken, userInfo);
authenticator.execute()
.then( userToken => {
// Configure Alice Onboarding with the OnboardingConfig
// Then, Run the Alice Onboarding Flow
})
.catch(err => {
// Inform the user about Authentication Errors
});
See also
For more details and examples about the In-App sandbox managers please check the corresponding Authentication sections of each client-side SDK.