Trending Topics: Latest from our forums (May 2023)

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

Thread: Docusign API embedded signature implementation Symfony

Summary: The developer is using Symfony with PHP Server code and is having trouble getting an access token to make Docusign API calls using JWT

Answer: Originally the developer was trying to implement JWT by himself, but since he’s using PHP, it would be a better approach to use the Docusign eSignature PHP SDK. Then he needed to run this code in order to obtain an access token using JWT (assuming he already has consent):

function generate_jwt_token(ApiClient $apiClient) {
        $relativePath = "/../web/private.key";
        $basePath = $this->container->get('kernel')->getRootDir() . $relativePath;
        $jwt = $apiClient->requestJWTUserToken('Integration_Key', 'USER_ID', 
               file_get_contents($basePath), ['signature', 'impersonation']);
        return $jwt;

Note: if you’re new to Docusign development and would like to ramp up quickly on how to use JWT with PHP, we recommend using our Quickstart to generate personalized code using your developer account

Thread: Docusign : Populate Dropdown options using php code in a docusign template before creating envelope

Summary: The developer wants to use a template and have a drop-down for the signer to choose from. They want to be able to populate the values in the drop-down using PHP code.

Answer:  The name of the class in the Docusign eSignature PHP SDK is ModelList and it goes in the array of tabs called ListTabs inside the tabs object. If you are using a template and need the values of the drop-down to be different for each envelope, and not set on the template level, you will have to make a call to replace the tabs by using the EnvelopeRecipientTab:update endpoint of the Docusign eSignature REST API.

Thread: Docusign automatic reminders for signing the template using PHP and Laravel API

Summary: The developer wants to have reminders sent to recipients of the envelope that are sent using an integration they will build using PHP.

Answer: You can set custom reminders for envelopes that you sent using PHP code like this:

$envelopeDefinition = new \Docusign\eSign\Model\EnvelopeDefinition(); 
$notification = new \Docusign\eSign\Model\Notification(); 
# customize the notification for this envelope 
$reminders = new \Docusign\eSign\Model\Reminders(); 
# first reminder to be sent three days after envelope was sent 
# keep sending reminders every two days 
$expirations = new \Docusign\eSign\Model\Expirations(); 
$expirations->setExpireEnabled('true'); $expirations->setExpireAfter('30'); 
# envelope will expire after 30 days 
# expiration reminder would be sent two days before expiration 

Additional resources

Inbar Gazit
Inbar Gazit
Sr. Manager, Developer Content