Trending Topics: Latest from our forums (October 2023)

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

Thread: Error when calling DocuSign's get access token API on iOS

https://stackoverflow.com/questions/77233942/

Summary: The developer is building a mobile application using the iOS mobile SDK and is getting the following error when trying to authenticate to DocuSign to make API calls:

{
     "error": "invalid_request",
     "error_description": "code challenge and code challenge method required"
}

Answer: This error indicates that the Proof Key for Code Exchange (PKCE) feature was enabled for the integration key by the developer. This feature enhances the security of Authorization Code Grant flow, To use the optional PKCE code challenge, before starting the standard ACG flow and requesting an authorization code, first create a pair of code challenge values:

  1. Generate a cryptographically random string to use as the code_verifier.

Hash the string you generated with the SHA256 algorithm using a standard cryptography library or tool, then Base64 URL-encode it. The resulting value is the code_challenge.

Thread: Convert fillable python pdf to readonly like browser save_as_pdf functionality

https://stackoverflow.com/questions/77248525/

Summary: The developer is using the DocuSign eSignature Python SDK to build an integration that should present envelopes with documents containing numbers that should fit into boxes, and finds it hard to get it looking quite right. Instead of looking like this:

Tabs aligned with boxes: Desired result

it looks like this:

Tabs aligned with boxes: Incorrect result

Answer:  Text and numerical tabs can be changed in size and font, but it’s extremely difficult to have them map correctly to a pre-existing set of boxes like this. The best way to handle this is to create ten text or numerical tabs, one for each box. You can do that using a for loop that goes from 1 to 10, and then iterate and increase the number of pixels linearly after you experiment and find out how many pixels is the width of each of these boxes. The Python code would look something like this:

for x in range(10):
  text_box = Text(
  anchor_string="Depot", anchor_units="pixels",
  anchor_y_offset="-10", anchor_x_offset=300+x*35,
  font="helvetica", font_size="size11",
  bold="true", value=args["signer_name"],
  locked="true", tab_id="Textbox" + x,
  tab_label="Textbox" + x)
  signer.tabs.append(text_box)

Thread: DocuSign Variable Number of Signers

https://stackoverflow.com/questions/77265111/

Summary: The developer is building an integration using the DocuSign C# eSignature SDK and wants to send envelopes with different sets of signers based on certain information and decisions that are made only when the envelope is created, and not predefined on the template that was used to create the envelope.

Answer: The developer should use Conditional Routing, which is a feature of DocuSign enabling senders to allow for certain recipients to change based on conditions placed on the envelope. For example, you can have a tab on the envelope that is used to determine the set of recipients based on the value of that tab. It’s especially useful to do that with drop-down tabs that have a list of values to help make a selection, but it can be done using checkboxes or radio buttons or even text tabs.You do this by adding groups of recipients to what are called “Conditional Routing Groups” and then add rules that determine if these groups (which can contain just a single recipient) are going to be in the envelope or not (if the condition is true, they will be). All of this can be done either via the web app or the eSignature API as needed.

Additional resources

Inbar Gazit
Author
Inbar Gazit
Sr. Manager, Developer Content
Published