# Getting Started

## Introduction

In this tutorial we will not implement anything and instead we will go through the identification process and use `curl` to call the Authenteq API. We strongly recommend following this tutorial before you jump to the integration explained in the guide "[How to integrate Web?](https://docs.authenteq.com/web-idv/how-to-integrate-web)".

Before we start, please sign in to the [Customer Dashboard](https://customer-dashboard.app.authenteq.com/) to get your client credentials and to register a redirect URL on the API Keys page. Your redirect URL should lead back to your service. If you don't have one yet then just use `https://example.com/redirect`. Please also prepare your ID. It can be a passport, national identity document or driving license.

## Direct User to Authenteq Identity Server

Use the following command to request the identity verification session. Just replace `<clientId>` , `<clientSecret>` with your client credentials and `<redirectUrl>` with your redirect URL.

```bash
curl --user <clientId>:<clientSecret> \
     --location 'https://api.app.authenteq.com/web-idv/verification-url' \
     --get --data-urlencode 'redirectUrl=<redirectUrl>'
     
{"verificationUrl":"https://web-idv.app.authenteq.com/verify?token=..."}
```

Open the provided verification URL in your browser. Ideally, in your mobile browser.

## User Performs Identification

**Follow the steps of the identification (introduction, document scan, liveness check, redirect).** Your user will go through the same process. Continue upon the successful redirect.&#x20;

You should have been redirected to:

```
<redirectUrl>?code=...
```

## Getting the Code

Now the user was redirected back to your service. With that redirect, we send back the `code` in a parameter.

**Go to the address bar of your browser and copy the value of the** `code` **parameter.**&#x20;

## Retrieving Result

Once you have a code, you can retrieve the result details. **Pay attention, for security reasons, the code can be used once only.** Let's call `/web-idv/verification-result` endpoint. Execute the following command with the same `clientId`, `clientSecret` , `redirectUrl`  and the `code` you got earlier.

```bash
$ curl --user <clientId>:<clientSecret> \
       --location 'https://api.app.authenteq.com/web-idv/verification-result' \
       --get --data-urlencode 'redirectUrl=<redirectUrl>' --data 'code=<code>'
{
  "id": "3631324b-5bcc-48b0-b717-4f12f45e0a1d",
  "status": "PASSED",
  "platform": "WEB",
  "startTime": "2020-04-10T11:44:40Z",
  "endTime": "2020-04-10T11:47:23Z",
  "livenessFaceImage": {
    "contentType": "image/jpeg",
    "content": "bGl2ZW5lc3NGYWNlSW1hZ2UK"
  },
  "documentData": {
    "documentType": "DL",
    "documentNumber": "1234567890",
    "issuingCountry": "USA",
    "jurisdiction": "UT",
    "nationality": "USA",
    "surnameAndGivenNames": "DOE JOHN",
    "surname": "DOE",
    "givenNames": "JOHN",
    "nameSuffixes": "MR",
    "namePrefixes": "JR",
    "sex": "M",
    "dateOfBirth": "1964-12-30",
    "dateOfExpiry": "2022-12-30",
    "dateOfIssue": "2012-05-30",
    "address": "430-985 ELEIFEND^DULUTH WA 92611",
    "licenseClass": "B/C/D",
    "licenseClassDetails": {
      "B": {
        "from": "2019-01-30",
        "to": "2029-01-30",
        "notes": "Some valuable note"
      },
      "C": {
        "from": "2019-01-30",
        "to": "2029-01-30"
      },
      "D": {
        "from": "2019-01-30",
        "to": "2029-01-30"
      }
    },
    "croppedFrontImage": {
      "contentType": "image/jpeg",
      "content": "Y3JvcHBlZEZyb250SW1hZ2U="
    },
    "croppedBackImage": {
      "contentType": "image/jpeg",
      "content": "Y3JvcHBlZEJhY2tJbWFnZQ=="
    },
    "faceImage": {
      "contentType": "image/jpeg",
      "content": "ZmFjZUltYWdlCg=="
    }
  },
  "nfcVerified": false
}
```

**We are done!** The result details reached your system.
