How to add SMS authentication to signature requests using BoldSign API?
To add SMS authentication to signature requests which verifies the signer with the SMS OTP, you need to include AuthenticationType
as SMSOTP
. It is also mandatory to add CountryCode
and Number
for SMS authentication. This feature is available only for paid plan users.
To enable SMS verification, you need to include the above parameters to the following endpoints:
v1/document/send
v1/document/createEmbeddedRequestUrl
If you are sending a document using template, you need to include those parameters to the following endpoints:
v1/template/send
v1/template/createEmbeddedRequestUrl
Sending a document to the signer with SMS authentication
To send a document to the signer with SMS authentication, follow these steps:
Use one of the example code snippets below, depending on your preferred programming language.
Code Snippet
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 'Signers={
"name": "hanky",
"emailAddress": "hankyWhites@gmail.com",
"signerType": "Signer",
"signerRole": "Signer",
"authenticationType": "SMSOTP",
"phoneNumber": {
"countryCode": "{Signer country code}",
"number": "{Signer phone number}"
},
"formFields": [
{
"id": "signature",
"name": "signature",
"fieldType": "Signature",
"pageNumber": 1,
"bounds": {
"x": 100,
"y": 100,
"width": 200,
"height": 200
},
"isRequired": true
}
],
"locale": "EN"
}' \
-F 'Files=@{your file}' \
-F 'Title={title}' \
Replace the values (Files
, Signers
, etc.) with the actual values. Set the value for authenticationType
as SMSOTP
, and provide values for countryCode
and number
with the signer’s country code and phone number.
Upon execution, the document will be created with SMS athentication, and a document ID will be generated.
Accessing the SMS authenticated document
- When the signer opens the document link, they will see a
Send OTP
button. Clicking this button will trigger the sending of an OTP to the signer via SMS.
- After the signer enters the OTP and clicks the
Verify
button, the document will open, and the signer can start the signing process.