# Risk Analysis

Risk Analysis is an optional Incode feature, built in collaboration with [Sardine](https://www.sardine.ai/), that adds fraud and risk signals to your onboarding flow. This page walks you through three steps to enable it: create a session, initialize the SDK with the resulting token, and view results in the Sardine dashboard.

Risk Analysis is available for SDK versions 5.17.0 and later.

***

## Prerequisites

Risk Analysis depends on the Sardine SDK. View Sardine's [Getting Started documentation](https://docs.sardine.ai/docs/risk/getting-started) and learn how to [set up the Sardine Android SDK](https://docs.sardine.ai/docs/risk-sdk/android) by adding the Sardine SDK dependency. You must have Sardine credentials to access their documentation; see their [getting API access](https://docs.sardine.ai/docs/risk/api-access) guide if you need credentials.

***

## Set Up Risk Analysis

### Create an Onboarding Session

Create an onboarding session to receive an `access_token`.

In the command below, replace `YOUR_SESSION_KEY` and `YOUR_CUSTOMER_ID` with actual values: For example, `"sessionKey": "e821b8fe-e3b4-4d90-b792-919c8bc3341e-test"` and `"customerId": "incode-test"`.

```bash
curl --location --request POST 'https://api.sandbox.sardine.ai/v1/identity-documents/tokens' \
--header 'Authorization: Basic ZDg5NDg1ZjMtOTA2Ny00NTliLWI2MDMtNmFlMDYyMzFjYzgwOmNlNmQ2MTE4LWM0MzktNGI2MC1hNjE4LTcxOTM5Yzk1NmU2ZQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
"sessionKey": "YOUR_SESSION_KEY",
"customerId": "YOUR_CUSTOMER_ID",
"platform": "android",
"provider": "incode"
}'
```

Run the command, then store the `access_token` from the response for the next step.

### Initialize the SDK

Once you have an `access_token`, [initialize the SDK with an external token](https://developer.incode.com/docs/android-installation#initialize-with-an-external-token). Provide the `access_token` as a parameter for `SessionConfig.Builder.setExternalToken(access_token)` when building `SessionConfig`, before starting the flow.

### See Risk Analysis on the Sardine Dashboard

After the flow completes, Risk Analysis results are available in the [Sardine dashboard](https://dashboard.sandbox.sardine.ai/document-verifications). Contact your Incode representative for access.

***

For help, see [API Reference](https://developer.incode.com/docs/android-api-reference) or contact your Incode representative.
