Home > Blockchain >  How to pass phone verification in DocuSign?
How to pass phone verification in DocuSign?

Time:03-23

Here i use DocuSign SDK code for send envelope, so in this how to pass phone verification ?

In this code I pass signer and signing location with the help of co-ordinates and send to envelope. I get access token without fail.

Private Function DoWork(ByVal signerEmail As String, ByVal signerName As String, ByVal ccEmail As String, ByVal ccName As String, ByVal accessToken As String, ByVal basePath As String, ByVal accountId As String, ByVal templateId As String) As String
    Dim config = New Configuration(New ApiClient(basePath))
    config.AddDefaultHeader("Authorization", "Bearer " & accessToken)
    Dim envelopesApi As EnvelopesApi = New EnvelopesApi(config)
    Dim envelope As EnvelopeDefinition = MakeEnvelope(signerEmail, signerName, ccEmail, ccName, templateId)
    Dim result As EnvelopeSummary = envelopesApi.CreateEnvelope(accountId, envelope)
    Return result.EnvelopeId
End Function

Private Function MakeEnvelope(ByVal signerEmail As String, ByVal signerName As String) As EnvelopeDefinition
Dim buffer As Byte() = System.IO.File.ReadAllBytes(Config.docPdf)
Dim envelopeDefinition As EnvelopeDefinition = New EnvelopeDefinition()
envelopeDefinition.EmailSubject = "Please sign this document"
Dim doc1 As Document = New Document()
Dim doc1b64 As String = Convert.ToBase64String(buffer)
doc1.DocumentBase64 = doc1b64
doc1.Name = "Lorem Ipsum"
doc1.FileExtension = "pdf"
doc1.DocumentId = "3"
envelopeDefinition.Documents = New List(Of Document) From {
    doc1
}
Dim signer1 As Signer = New Signer With {
    .Email = signerEmail,
    .Name = signerName,
    .ClientUserId = signerClientId,
    .RecipientId = "1"
}
Dim signHere1 As SignHere = New SignHere With {
    .AnchorString = "/sn1/",
    .AnchorUnits = "pixels",
    .AnchorXOffset = "10",
    .AnchorYOffset = "20"
}
Dim signer1Tabs As Tabs = New Tabs With {
    .SignHereTabs = New List(Of SignHere) From {
        signHere1
    }
}
signer1.Tabs = signer1Tabs
Dim recipients As Recipients = New Recipients With {
    .Signers = New List(Of Signer) From {
        signer1
    }
}
envelopeDefinition.Recipients = recipients
envelopeDefinition.Status = "sent"
Return envelopeDefinition
 End Function

I want to pass phone number to verify once open document from email. Anybody help in this feature will appreciated.

Thanks and Regards Aravind

CodePudding user response:

https://developers.docusign.com/docs/esign-rest-api/how-to/phone-auth/

Dim workflow As RecipientIdentityVerification = New RecipientIdentityVerification() With {
    .WorkflowId = workflowId,
    .InputOptions = New List(Of RecipientIdentityInputOption) From {
        New RecipientIdentityInputOption With {
            .Name = "phone_number_list",
            .ValueType = "PhoneNumberList",
            .PhoneNumberList = New List(Of RecipientIdentityPhoneNumber) From {
                New RecipientIdentityPhoneNumber With {
                    .Number = phoneNumber,
                    .CountryCode = countryAreaCode
                }
            }
        }
    }

Since we don't have VB.NET examples, I used this site to convert C# code. }

  • Related