PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, August 26, 2022

[FIXED] How to pass phone verification in DocuSign?

 August 26, 2022     docusignapi, vb.net     No comments   

Issue

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


Solution

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. }



Answered By - Inbar Gazit
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing