> For the complete documentation index, see [llms.txt](https://deeplinkdoc.paveapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deeplinkdoc.paveapi.com/native-mobile-app/overview.md).

# Overview

## What is Deep Linking?

Deep Linking is a technique in which a given URL or resource is used to open a specific page or screen on mobile. So, instead of just launching the app on mobile, using our deep link method can lead a user to open PAVE's PWA in their browser. When finished, they will be redirected to a specific page within your native app, providing a seamless mobile experience. This particular page or screen you provide as a redirect URL may reside under a series of hierarchical pages, hence the term "deep" in deep linking.

## How does the PAVE Deep Linking work?

![Flowchart diagram of PAVE Deep Linking](https://1572647844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgsLtHL-kV8GhxDbxO-%2F-Mk1n8VMRc8sKiAMx8Ie%2F-Mk1q_VQ97He3wLHjzT-%2FScreen%20Shot%202021-09-20%20at%205.56.49%20PM.png?alt=media\&token=7b44e929-ec90-4885-8f17-ed72a174c77a)

## Create New Session

<mark style="color:green;">`POST`</mark> `https://api.paveapi.com/v1/generate-session-id/:api-key`

Replacing: **API-KEY** with the unique license-specific API-Key provided within the **INTEGRATIONS** tab of the PAVE Dashboard will generate a Session ID (case id). A new session id must be generated onthe server-side for each inspection case (ie for each vehicle being inspected). We recommend you store the session IDs since they'll be used to identify the final inspection output as well.

#### Path Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| api-key | string | API - Key   |

#### Request Body

| Name          | Type   | Description                    |
| ------------- | ------ | ------------------------------ |
| redirect\_url | string | The url you want to return to. |

{% tabs %}
{% tab title="200 " %}

```
{
    "session_key": "TOA-3DFDC8Z64V",
    "status": "IDLE",
    "active": true,
    "redirect_url": "paveapp://",
    "start_date": "September 17th, 2021"
}
```

{% endtab %}
{% endtabs %}

## Launch PAVE Capture UI

```
https://api.paveapi.com/v1/launch/:SESSION-ID
```

Once you have the Session Key generated it can be used to launch the capture UI, which begins the inspection process.

Replac&#x65;**: SESSION-ID** with the generated session-id belonging to the vehicle to be inspected.

Example:

```
https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/
```

Open links with Safari or chrome.

![](https://1572647844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgsLtHL-kV8GhxDbxO-%2F-Mk2SDAyAnr_YTPUwpfZ%2F-Mk2SksMnchqNByqF3rW%2Fimage.png?alt=media\&token=5062ff0e-cff6-45dc-80c8-e6f48975fbfb)

### Android

{% tabs %}
{% tab title="Java" %}

```
String url = "https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/";
try {
    Uri uri = Uri.parse("googlechrome://navigate?url=" + url);
    Intent i = new Intent(Intent.ACTION_VIEW, uri);
    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(i);
} catch (ActivityNotFoundException e) {
    // Chrome is probably not installed
}
```

{% endtab %}

{% tab title="Kotlin" %}

```
  val url = "https://capture-dev.paveapi.com/home/TMV-B0R97T5QOD/"
  try {
    val uri: Uri = Uri.parse("googlechrome://navigate?url=$url")
    val i = Intent(Intent.ACTION_VIEW, uri)
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
        startActivity(i)
        } catch (e: ActivityNotFoundException) {
            // Chrome is probably not installed
        }
```

{% endtab %}
{% endtabs %}

### IOS

{% tabs %}
{% tab title="Swift" %}

```
guard let url = URL(string: "https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/") 
else { return }
UIApplication.shared.open(url)
```

{% endtab %}

{% tab title="Objective C" %}

```
NSURL *url = [NSURL URLWithString:@"https://capture-dev.paveapi.com/home/TMV-B0R97T5QOD/"];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
   [[UIApplication sharedApplication] openURL:url];
}
```

{% endtab %}
{% endtabs %}

### React Native

```
Linking.openURL('https://api.paveapi.com/v1/launch/TMV-B0R97T5QOD/')}}
```

## Result

After **PAVE Capture** successfully and tap on **`CLOSE`** button, you will redirect to your app.

<div align="left"><img src="https://1572647844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgsLtHL-kV8GhxDbxO-%2F-Mk29glwSgRCeRV9xVHe%2F-Mk2Q9QVlOsHR6Lx1ins%2FScreen-Recording-2021-09-20-at-8.33.41-PM.gif?alt=media&amp;token=3d63ca75-7162-48e6-adc1-ccffc474fadc" alt=""></div>
