Trending Topics: Latest from our forums (July 2023)

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

Thread: Set signature placeholder in existing pdf file

https://stackoverflow.com/questions/76671162/

Summary: The developer is using the DocuSign eSignature C# SDK and is trying to send an envelope and place signature elements (tabs) on it programmatically. They don’t see the tabs on the envelope when they try the code.

Answer: On the Dev Center we have a how-to article and code examples that show how to do that in eight languages, including C#. You can find the C# code for this in GitHub. The issue the developer had to do with the anchor strings. While copying the sample code included this in the code:

 SignHere signHere1 = new SignHere
{
     AnchorString = "/sn1/",
     AnchorUnits = "pixels",
     AnchorXOffset = "10",
     AnchorYOffset = "20",
 };

This code didn’t work because the /sn1/ string was not present in the document that the developer used for signing. They can fix it by replacing the document or by using fixed positioning to place the tab. With fixed positioning you specify the x and y coordinates (in pixels) as well as the document and page number. This is a more accurate way to place a tab, but is less flexible when the document changes.

Thread: After promoting to production - Scope in access token always none after consent granted

https://stackoverflow.com/questions/76715263/

Summary: The developer recently went live with an integration that is using the DocuSign Admin API. Their integration worked perfectly on the developer environment, but is giving them a permission error when they try to use it in production.  

Answer:  Generally speaking, after you go live, you have to update various configuration elements to point to the production environment, since they were using the developer account prior to go-live. The After Go-Live article talks about this in more detail. One additional consideration has to do with features or capabilities that may not exist in your production account. The developer environment gives all developers full access to nearly every feature in the DocuSign system. However, when you promote your application to use your production account, this account may not have access to all DocuSign features and if your application tries to use one of these features, you may get an error message. In this case, some of the Admin API functionality requires a DocuSign Admin add-on that is not enabled by default for all production accounts. To fix this issue, the developer would have to talk to the DocuSign Sales team and upgrade their account. 

Thread: Want to show DocuSign in Angular in iframe

https://stackoverflow.com/questions/76657518/

Summary: The developer downloaded the C# Quickstart and was able to get the app to work. They wanted to replace the front end with Angular code and have the signing experience inside an iframe in their app, but were running into issues.

Answer: Since they're using Authorization Code Grant, that requires that users log into their DocuSign account inside the web application. Doing this inside an iframe is not allowed for security reasons. The main reason for this restriction is that users providing their password to DocuSign should be able to clearly inspect the browser URL and ensure they’re logging into DocuSign. If this is done inside an iframe, they wouldn’t be able to confirm the authenticity of the party requesting them to enter their DocuSign password.

To resolve this problem, the developer has a few options. They can use JWT Grant, which bypasses the need for the end-user to log in; they can do the authentication in a pop-up and the signing in an iframe; or they can avoid using an iframe altogether. The only limitation is that users will never be required to enter their password inside an iframe. 

Additional resources

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