Users keep getting token expired message

  • 2
  • Question
  • Updated 10 months ago
I am using the Right Signature API to send out links to document signers, but it seems after 5 or 10 minutes, the tokens have expired because users are getting a message telling them their token is no longer valid.  I would suspect these tokens to have at least a 24 hour shelf life if not longer?  Can someone advise me on this?
Photo of Rusty Pancrazio

Rusty Pancrazio

  • 4 Posts
  • 1 Reply Like

Posted 11 months ago

  • 2
Photo of Adam Lewis

Adam Lewis

  • 1 Post
  • 0 Reply Likes
Today, all of my users are receiving invalid / expired tokens via email. on most days, the links expire within a few hours. according to support, they should only expire within 30 days. 

These links are not working at all today and wondering if there is a time frame to having them fixed?
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 90 Posts
  • 5 Reply Likes
Please provide more detail about the calls you are making.  Also provide more details about the error the users are receiving after clicking the link in their email.
Photo of Rusty Pancrazio

Rusty Pancrazio

  • 4 Posts
  • 1 Reply Like
The code we are using is below (note: some of the values such as "template_id" are just sample data.  At the end of the code you see we get a "signer_token".   We then just send the user to

https://rightsignature.com/signatures/embedded?height=700&rt=".$signerToken

and what is happening is that when you go to the link, you get a screen that says "Token invalid or expired." 

Here is an example of a link that was created on 2018-01-15 18:50:59

https://rightsignature.com/signatures/embedded?height=700&rt=cfb923f024454271ae7cb8a302486405

<?php
$templateId = 'a_123_456';
$username = 'User Name';
$redirectUrl = 'http://some.url';
$clientName='Client';
// personal
                        $prefill = [
                            'title' => 'PERSONAL',
                            'clientname' => 'User name',
                            'guarantor' => 'User name',
                            'address' => 'User address',
                            'taxid' => 'User taxid',
                            'witness_name' => 'Witness first and last name',
                            'personal_checkbox' => 'X',
                            'business_state' => 'User state',
                            'city' => 'User city,
                        ];

$client = \RightSignature\HttpClient::forToken(self::$_token);
$client->setVerifySSL(false);
$rs = new \RightSignature($client);
$document = $rs->prepackageTemplate($templateId);
$documentData = $document->asArray();

 $data = array();
        foreach($documentData['roles'] as $client) {
            if( $client['must_sign']) {
                $data[] = array(
                    'name' => $client['name'],
                    'email' => 'noemail@rightsignature.com',
                    'role_name' => $client['role'],
                    'role_id' => $client['document_role_id'],
                    'locked' => true,
                );
            }
        }
        $args = array(
            'roles' => $data,
            'subject' => $username . ' document sign',
        );

        // prefill fields for template
        if( $prefill ) {
            foreach($prefill as $key=>$value) {
                $args['merge_fields'][] = ['merge_field_name'=>$key, 'value'=>$value];
            }
        }

        $documentGuid = $document->prefillAndSend($args);
        $links = $rs->signerLinks($documentGuid,$redirectUrl)->asArray();

        foreach($links as $link) {
            if( $link['name']==$clientName )
                $signerToken = $link['signer_token'];
        }

?>
Photo of Rusty Pancrazio

Rusty Pancrazio

  • 4 Posts
  • 1 Reply Like
Does anybody ever follow up on these messages?  You don't offer phone support and we are directed here - then our posts go unanswered??
Photo of Kelly Leeman

Kelly Leeman, Employee, Software Engineer

  • 90 Posts
  • 5 Reply Likes
Hi Rusty, 

Based on the documentation here https://rightsignature.com/apidocs/api_documentation_php#/prepackage_template the tokens should last 30 minutes. If this not the endpoint you are referencing, please point me to the documentation that you are using.
Photo of Rusty Pancrazio

Rusty Pancrazio

  • 4 Posts
  • 1 Reply Like
Hey Kelly, so let me run down my situation and you tell me if Right Signature has a solution for this,

Our system makes a pre-packaged template call for a document that requires 3 signers.  The first signer signs right away when the document is created.  We then send an email to the 2 other signers that contains the right signature link (which has the token in it) for them to complete their signatures.

Most people do not respond right away and usually not within 30 minutes.  A co-signer might be at work or a doctors appointment and then don't see the email until hours later. By then the link is expired and we are dead in the water - our only option is to start the process all over again.

Please explain how we resolve this problem.  
Thank you.