The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

The BoldSign mobile app is now available. Visitthis link for more details and give it a try!

Request Demo

Features

Explore the BoldSign features that make eSigning easier.

How to Send Documents for eSignature with Identity Verification via API​

How to Send Documents for eSignature with Identity Verification via API

Identity verification is a crucial layer of security in digital document workflows. It’s seamlessly integrated into BoldSign as a signer authentication option. Requiring signers to authenticate their identity before accessing documents mitigates the risks of unauthorized use and safeguards sensitive information. Identity verification via the BoldSign API provides peace of mind for businesses and individual signers alike.

Read more about identity verification.

Identity verification frequency

You can choose how often to verify a signer’s identity in BoldSign. Here are the options:

  • Every access: With this option, signers are required to authenticate their identity each time they access the document, regardless of whether they’ve previously signed it.
  • Until signed: Identity authentication is necessary until the signer completes their signature. Once the signature is finalized, the signer will no longer need to authenticate their identity for subsequent access to the document. This option strikes a balance between security and user convenience.
  • Once per document: Signers authenticate their identity only once, even if they access the document multiple times. Once their identity is verified initially, they can freely access and interact with the document without the need for further identity authentication. This option maximizes user convenience while maintaining a baseline level of security for document access.

These options allow organizations to tailor their document workflows to suit their specific security requirements and user experience preferences. Whether prioritizing stringent security measures or optimizing for user convenience, BoldSign provides flexibility to meet diverse needs.

Code samples

The following code samples demonstrate how to send documents requiring every access identity verification via the BoldSign API in various programming languages.

Curl

    
curl -X 'POST' \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {Your API Key}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'Files=@{Your file name);type=application/pdf' \
  -F 'Title={Title}' \
  -F 'Signers={
  "name": "Test",
  "emailAddress": "alexgayle@cubeflakes.com",
  "authenticationType": "IdVerification",
  "deliveryMode": "Email",
  "identityVerificationSettings": {
    "type": "EveryAccess",
    "maximumRetryCount": 10,
    "requireLiveCapture": true,
    "requireMatchingSelfie": true,
    "nameMatcher": "Strict"
  },
  "signerType": "Signer",
  "allowFieldConfiguration": true,
  "formFields": [
    {
      "id": "signature1",
      "name": "signature1",
      "fieldType": "Signature",
      "pageNumber": 1,
      "bounds": {
        "x": 160,
        "y": 150,
        "width": 51,
        "height": 21
      },
      "isRequired": true
    }
  ]
}'
 

C#

    
            var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}");
            var documentClient = new DocumentClient(apiClient);

            var documentFilePath = new DocumentFilePath
            {
                ContentType = "application/pdf",
                FilePath = "{Your File Path}",
            };

            var filesToUpload = new List<IDocumentFile>
{
    documentFilePath,
};

            var signatureField = new FormField(
               id: "sign",
               isRequired: true,
               type: FieldType.Signature,
               pageNumber: 1,
               bounds: new Rectangle(x: 100, y: 100, width: 100, height: 50));

            var formFieldCollections = new List<FormField>()
{
    signatureField
};
            var idSettings = new IdentityVerificationSettings
            {

              Type = Model.IdVerification.IdVerificationType.EveryAccess,
              MaximumRetryCount = 10,
              RequireLiveCapture = true,
              RequireMatchingSelfie = true,
              NameMatcher = Model.IdVerification.NameVariation.Strict,

            };

            var signer = new DocumentSigner(
              signerName: "Signer Name",
              signerType: SignerType.Signer,
              signerEmail: "alexgayle@cubeflakes.com",
              authenticationType: AuthenticationType.IdVerification,
              identityVerificationSettings: idSettings,
              formFields: formFieldCollections,
              locale: Locales.EN);

            var documentSigners = new List<DocumentSigner>()
{
    signer
};	
            var sendForSign = new SendForSign()
            {
                Title = "Agreement",
                Signers = documentSigners,
                Files = filesToUpload,

            };
            var documentCreated = documentClient.SendDocument(sendForSign);
            Console.WriteLine(documentCreated.DocumentId);
 

Python

    
import requests # type: ignore
import json

url = "https://api.boldsign.com/v1/document/send"

signer_data = {
    "name": "Test",
    "emailAddress": "alexgayle@cubeflakes.com",
    "signerType": "Signer",
         "authenticationType": "IdVerification",
        "identityVerificationSettings": {
          "type": "EveryAccess",
          "maximumRetryCount": 10,
          "requireLiveCapture": True,
          "requireMatchingSelfie": True,
          "nameMatcher": "Strict"
        },      

    "formFields": [
        {
            "id": "signature1",
            "name": "signature1",
            "fieldType": "Signature",
            "pageNumber": 1,
            "bounds": {
                "x": 50,
                "y": 50,
                "width": 200,
                "height": 25
            },
            "isRequired": True
        }
    ],
    "locale": "EN"
}

payload = {
    'Signers': json.dumps(signer_data),
    'Title': 'Title',
}
files=[
  ('Files',('file',open('{Your file path}','rb'),'application/pdf'))
]

headers = {
  'accept': 'application/json',
  'X-API-KEY': '{Your API Key}'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
 

Node.js

    
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
let data = new FormData();

const signerData = {
  name: 'Name',
  emailAddress: 'alexgayle@cubeflakes.com,
  signerType: 'Signer',
  signerRole: 'Signer',
  authenticationType: 'IdVerification',
  "identityVerificationSettings": {
    "type": "EveryAccess",
    "maximumRetryCount": 10,
    "requireLiveCapture": true,
    "requireMatchingSelfie": true,
    "nameMatcher": "Strict"
  },

  formFields: [
    {
      id: 'signature',
      name: 'signature',
      fieldType: 'Signature',
      pageNumber: 1,
      bounds: {
        x: 160,
        y: 100,
        width: 100,
        height: 100
      },
      isRequired: true
    }
  ],
  locale: 'EN'
};
data.append('Signers', JSON.stringify(signerData));
data.append('Files', fs.createReadStream('{Your file path}'));
data.append('Title', '{title}');

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.boldsign.com/v1/document/send',
  headers: {
    accept: 'application/json',
    'X-API-KEY': '{Your API Key}',
    ...data.getHeaders()
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });
 

PHP

    
<?php
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use \GuzzleHttp\Psr7\Utils;

$client=new GuzzleHttp\Client(['verify'=> false, ]);
$headers = [
  'accept' => 'application/json',
  'X-API-KEY' => '{Your API Key}'
];
$options = [
  'multipart' => [      
    [
      'name' => 'Signers',
      'contents' => '{
        "name": "Test",
        "emailAddress": "alexgayle@cubeflakes.com",
        "signerType": "Signer",
        "authenticationType": "IdVerification",
        "identityVerificationSettings": {
          "type": "EveryAccess",
          "maximumRetryCount": 10,
          "requireLiveCapture": true,
        "requireMatchingSelfie": true,
          "nameMatcher": "Strict"
        },      
        "formFields": [
           {
                "id": "signature1",
                "name": "signature1",
                "fieldType": "Signature",
                "pageNumber": 1,
                "bounds": {
                  "x": 50,
                  "y": 50,
                  "width": 61,
                  "height": 21
                   },
      "isRequired": true
    }
  ],
  "locale": "EN"
}'
    ],
    [

      'name' => 'Files',
    'filename' => 'File name',
      'headers'  => [
        'Content-Type' => 'application/pdf'
      ]
    ],
    [
      'name' => 'Title',
      'contents' => 'Title'
    ]
]];
$request = new Request('POST', 'https://api.boldsign.com/v1/document/send', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
 

Conclusion

Utilize the code samples in this blog to quickly integrate secure document sending with identity verification directly into your application. If you’re not a BoldSign user yet, start your 30-day trial today to experience firsthand how BoldSign simplifies your document-sending workflows. We value your feedback, so please don’t hesitate to share your thoughts in the comments section below. If you have any questions or need further details about our services, please schedule a demo or reach out to our support team via our dedicated support portal.

Picture of James Agini Muganya

James Agini Muganya

James Agini Muganya is a Technical Assistant at BoldSign. He creates content in various formats, including API tutorials, help articles, and comprehensive guides.

Share this blog

Picture of James Agini Muganya

James Agini Muganya

James Agini Muganya is a Technical Assistant at BoldSign. He creates content in various formats, including API tutorials, help articles, and comprehensive guides.

Subscribe RSS feed

Leave a Reply

Your email address will not be published. Required fields are marked *