> For the complete documentation index, see [llms.txt](https://gl-docs.gitbook.io/zkpass/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gl-docs.gitbook.io/zkpass/zkpass-developers-guide/api-reference/restful-api/endpoints/generate-proof.md).

# Generate Proof

## Prerequisites

Before using the Generating Proof Endpoint, There are three essential items you'll need to use the endpoint:

1. `encryptedUserDataToken` : This token contains your encrypted user data
2. `encryptedDvrToken` : This token holds your encrypted DVR data
3. `apiToken` : This unique identifier authenticates your requests with the zkPass API

{% hint style="info" %}
`apiToken` is the base64 form of `YOUR_API_KEY:YOUR_API_SECRET`.
{% endhint %}

### Generating Encrypted Tokens:

For instructions on creating the `encryptedUserDataToken` and `encryptedDvrToken`, refer to our [**Utilities**](/zkpass/zkpass-developers-guide/api-reference/restful-api/utilities.md) **section**. It provides a step-by-step guide that covers:

1. [**Generating a Key Pair**](/zkpass/zkpass-developers-guide/api-reference/restful-api/utilities/generate-key-pair.md): This creates the keys you'll use for signing your data.
2. [**Signing User Data and DVR**](/zkpass/zkpass-developers-guide/api-reference/restful-api/utilities/sign-user-data-and-dvr.md)**:** This step adds a digital signature to your data tokens, ensuring their authenticity.
3. [**Encrypting User Data and DVR**](/zkpass/zkpass-developers-guide/api-reference/restful-api/utilities/encrypt-user-data-and-dvr.md)**:** This encrypts your data tokens, making them unreadable by anyone without the decryption key.

## Endpoint

<table><thead><tr><th width="266">Type</th><th>Value</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API endpoint (Playground)</td><td>https://playground-zkpass.ssi.id/api/1.0/dvr/1.0/proof</td></tr></tbody></table>

## Request Header

```
Authorization: Basic [apiToken]
Content-Type: application/json
```

| Parameter       | Description                                                    |
| --------------- | -------------------------------------------------------------- |
| `Authorization` | base64 form of `YOUR_API_KEY:YOUR_API_SECRET`                  |
| `Content-Type`  | Indicates that the content being sent or received is JSON data |

## Request Body

```json
{
    "user_data_token": "[encryptedUserDataToken]",
    "dvr_token": "[encryptedDvrToken]"
}
```

<table><thead><tr><th width="207">Parameter</th><th>Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>user_data_token</code></td><td><code>string</code></td><td>Mandatory</td><td>encrypted user data token in JWE format</td></tr><tr><td><code>dvr_token</code></td><td><code>string</code></td><td>Mandatory</td><td>encrypted dvr token in JWE format</td></tr></tbody></table>

{% hint style="info" %}
Please see example of encrypted User Data and DVR [here](/zkpass/zkpass-developers-guide/api-reference/restful-api/utilities/encrypt-user-data-and-dvr.md#output-example).
{% endhint %}

## Response

```json
{
    "status": 200,
    "proof": "eyJ0e..."
}
```
