# Identity Verification Image

The images uploaded by the signer for identity verification can be fetched using the Identity Verification Image API. These images can be accessed upon either successful or failed completion of the verification process by the signer and are accessible only to the sender. To fetch the images, you will first need the image file ID of the signer-uploaded document. This file ID can be fetched using the Identity Verification report API.


{% post /%}
{% path text="/v1/identityVerification/image" /%}

## Code snippet

{% codetab %}

cURL

```shell
curl -X POST 'https://api.boldsign.com/v1/identityVerification/image?documentId=55a6f0cf-xxx-xxxx-xxxx-796d02cb0977' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {your-api-key}' \
-d '{
  "EmailId": "alex.gayle@cubeflakes.com",
  "Order": 1,
  "FileId": "2e96f9ad-xxxx-xxxx-xxxx-3063e73f04f8"
}'
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "{your-api-key}");
var idVerificationClient = new IdVerificationClient(apiClient);

var documentId = "55a6f0cf-xxx-xxxx-xxxx-796d02cb0977";

var verificationImageRequest = new VerificationImageRequest()
{
    EmailId = "alex.gayle@cubeflakes.com",
    FileId = "2e96f9ad-xxxx-xxxx-xxxx-3063e73f04f8",
    Order = 1,
};

var idVerificationImage = idVerificationClient.GetImage(documentId, verificationImageRequest);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key = "YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    identity_verification_api = boldsign.IdentityVerificationApi(api_client)
    identity_verification_image = boldsign.DownloadImageRequest(
       emailId="luthercooper@cubeflakes.com",
       countryCode="+91",
       phoneNumber="98765433219",
       fileId="\tests\data\agreement.pdf",
       order=1
    )
    image_response = identity_verification_api.image("YOUR_DOCUMENT_ID", identity_verification_image)
```

PHP

```php
<?php

require 'vendor/autoload.php';
$config = new BoldSign\Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$apiInstance = new BoldSign\Api\IdentityVerificationApi($config);

$image_request  = new \BoldSign\Model\DownloadImageRequest();
$image_request ->setEmailId("hankwhite@cubeflakes.com");
$image_request ->setCountryCode("+91");
$image_request ->setPhoneNumber("0987544321");
$image_request->setFileId("\tests\data\agreement.pdf");
$image_request ->setOrder(1);
$result = $apiInstance->image("YOUR_DOCUMENT_ID", $image_request);
```
NodeJS

```js
import { IdentityVerificationApi, DownloadImageRequest } from "boldsign";

const identityVerificationApi = new IdentityVerificationApi("https://api.boldsign.com");
identityVerificationApi.setApiKey("YOUR_API_KEY");

var image_request = new DownloadImageRequest();
image_request.emailId = "luthercooper@cubeflakes.com";
image_request.countryCode = "+91";
image_request.phoneNumber = "9876543210";
image_request.fileId = "\tests\data\agreement.pdf";

var verification_image = await identityVerificationApi.image("YOUR_DOCUMENT_ID",image_request);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
      
IdentityVerificationApi identityVerificationApi = new IdentityVerificationApi(apiClient);
DownloadImageRequest downloadImageRequest = new DownloadImageRequest();
downloadImageRequest.setEmailId("david@cubeflakes.com");
downloadImageRequest.setCountryCode("+91");
downloadImageRequest.setPhoneNumber("9876543210");
downloadImageRequest.setFileId("\tests\data\agreement.pdf");

File verificationimage = identityVerificationApi.image("YOUR_DOCUMENT_ID",downloadImageRequest);
```

{% /codetab %}

## Query parameters

{% nestedtable %}

- {% arguments name="documentId" /%}{% batch datatype="string" /%} {% required /%}
- The document ID of the signer uploaded document for which the report is to be fetched.

---

{% /nestedtable %}

## Request body

{% nestedtable %}

- {% arguments name="EmailId" /%}{% batch datatype="string" /%}
- The email address of the user for which the report is to be fetched. Required when Email delivery mode is assigned for the signer.

---

- {% arguments name="CountryCode" /%}{% batch datatype="string" /%}
- The country code of the user for which the report is to be fetched. Required when SMS delivery mode is assigned for the signer.

---

- {% arguments name="PhoneNumber" /%}{% batch datatype="string" /%}
- The phone number of the user for which the report is to be fetched. Required when SMS delivery mode is assigned for the signer.

---

- {% arguments name="Order" /%}{% batch datatype="integer" /%}
- The order of the signer.

---

- {% arguments name="FileId" /%}{% batch datatype="string" /%}
- The image file ID of the signer uploaded document.

---

- {% arguments name="OnBehalfOf" /%}{% batch datatype="string" /%}
- The email address of the user on behalf of whom the report is to be fetched. Required when the sender is fetching the report on behalf of the sender identity.

---

{% /nestedtable %}

## Example response

***200 Success***

```json
Contains the image file.
```
