How to remove authentication after sending the document?
BoldSign offers different authentication methods to verify the signer's identity, including Email OTP (One-Time Password), SMS OTP (One-Time Password), Access Code and ID verification. These authentication methods can be added to signers during the document creation process. However, there may be instances where you need to remove a signer's authentication after the document has already been sent for signature. Only the sender and the sender’s admin can remove the authentication in document.
Below is an example code snippet demonstrating how to remove authentication for a specific recipient of a document.
Code snippet
curl -X PATCH "https://api.boldsign.com/v1/document/RemoveAuthentication?documentId={Your document id}" -H 'X-API-KEY:{Your API Key}' -H "Content-Type: application/json" -d "{\"emailId\": \"alexgayle@cubeflakes.com\"}"
using BoldSign.Api; var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}"); var documentclient = new DocumentClient(apiClient); await documentclient.RemoveAuthenticationAsync("{Your document id}", "alexgayle@cubeflakes.com").ConfigureAwait(false);
import requests import json url = "https://api.boldsign.com/v1/document/RemoveAuthentication?documentId={Your document id}" payload = json.dumps({ "emailId": "alexgayle@cubeflakes.com" }) headers = { 'X-API-KEY': '{Your API Key}', 'Content-Type': 'application/json' } response = requests.request("PATCH", url, headers=headers, data=payload) print(response.text)
const axios = require('axios'); async function RemoveAuthentication() { try { const response = await axios.patch( 'https://api.boldsign.com/v1/document/RemoveAuthentication', { emailId: 'alexgayle@cubeflakes.com' }, { params: { documentId: '{Your document id}' }, headers: { 'X-API-KEY': '{Your API Key}', 'Content-Type': 'application/json' } } ); return response; } catch (error) { console.error('Error:', error.message); throw error; } } RemoveAuthentication();
<?php require 'vendor/autoload.php'; use GuzzleHttp\Client; $client = new Client([ 'verify' => false ]); $url = 'https://api.boldsign.com/v1/document/RemoveAuthentication?documentId={Your document id}'; $headers = [ 'X-API-KEY' => '{Your API Key}', 'Content-Type' => 'application/json', ]; $payload = json_encode([ 'emailId' => 'alexgayle@cubeflakes.com', ]); $response = $client->request('PATCH', $url, [ 'headers' => $headers, 'body' => $payload, ]); echo $response->getBody(); ?>
In the provided code examples, make sure to update the documentId
with the actual ID of the document you created and the emailId
with the signer's email address. After executing the code, the authentication will be removed from the signature request document. The recipient will no longer be required to provide the authentication code to access the document.