Skip to main content
Blog
Home/

Trending Topics: Latest from our forums (September 2020)

Author Inbar Gazit
Inbar GazitSr. Manager, Developer Content
Summary3 min read

Trending Topics: Latest from our forums (September 2020)

      • Additional resources

      Table of contents

      Trending Topics

      Here are some of the latest popular questions that the Docusign developers community asked on Stack Overflow in the month of September 2020. You too can ask questions by using the tag docusignapi in Stack Overflow.

      Thread: How to get back file from Docusign template using REST Api?

      https://stackoverflow.com/questions/63883113/

      Summary: The developer is using eSignature templates to send envelopes. They are trying to get a specific document from a specific template using the Docusign eSignature REST API in VB.NET.

      Answer: First of all, for VB.NET developers, I would like to point out it’s possible to use the C# SDK. That SDK is a .DLL (nuget package) that works for anyone using the .NET Framework.

      The specific endpoint that should be used is TemplatesDocument::get; it returns a specific document from a specific endpoint. This can be used directly or via the SDK.

      Thread: Create a valid JWT Token for Docusign API

      https://stackoverflow.com/questions/63782355/ 

      Summary: The developer is attempting to use JWT (JSON Web Token) Authentication and is having problems obtaining an access token. 

      Answer: It’s recommended to use one of the eSignature SDKs to use JWT. They all include a method that makes it easier for developers to complete the process. 

      If you're still running into issues, common problems with JWT include:

      • Not obtaining consent

      • Using the public key of the RSA instead of the private one.

      • Using a malformed RSA key. The key must match exactly, including newline characters, as provided when copy/pasted from Docusign.

      • Not using the correct UserId (GUID) in the request.

      • Not requesting the "impersonation" scope in consent (#1 above).

      Thread: In Docusign using with Chilkat dll , how to pass templateRoles in json?

      https://stackoverflow.com/questions/63931690 

      Summary: The developer is trying to use Visual Basic (VB.NET) to send envelopes using a template.

      Answer: The following code was provided by using the Telerik(R) Code Converter from C# to VB.NET. The C# code came from the C# Code Examples (also known as the Code Launcher).

      Imports System 
      Imports System.Collections.Generic 
      Imports Docusign.eSign.Api 
      Imports Docusign.eSign.Client 
      Imports Docusign.eSign.Model 
      Imports Microsoft.AspNetCore.Mvc 
      
      Private Function DoWork(BVal 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 = ew Signer With { .Email = signerEmail, .Name = signerName, .ClientUserId = signerClientId, .RecipientId = "1" } 
        Dim signHere1 As SignHee = 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
      

      To use this code, you would need to include the Docusign eSign Nuget DLL in your project.

      Additional resources

      Author Inbar Gazit
      Inbar GazitSr. Manager, Developer Content

      Inbar Gazit has been with Docusign since 2013 in various engineering roles. Since 2019 he has focused on developer content. Inbar works on code examples including the launchers, available on GitHub in eight languages, and helps build sample apps showcasing the various Docusign APIs. He is also active on StackOverflow, answering your questions. Inbar can be reached at inbar.gazit@docusign.com.

      More posts from this author

      Related posts

      • Trending Topics: Latest from our forums (November 2024)
        Developer Trending Topics
        Author Paige Rossi
        Paige Rossi
      • Trending Topics: Latest from our forums (October 2024)
        Author Paige Rossi
        Paige Rossi
      • Trending Topics: Latest from our forums (September 2024)
        Author Paige Rossi
        Paige Rossi
      Trending Topics: Latest from our forums (November 2024)
      Author Paige Rossi
      Paige Rossi
      Trending Topics: Latest from our forums (October 2024)
      Author Paige Rossi
      Paige Rossi
      Trending Topics: Latest from our forums (September 2024)
      Author Paige Rossi
      Paige Rossi

      Discover what's new with Docusign IAM or start with eSignature for free

      Explore Docusign IAMTry eSignature for Free
      Person smiling while presenting