TJ Witte | Posts: 1

Did You Know - creating a Session Token using the signer's email address

0 votes
For integrated signing (e.g. iFrame in your portal application - signer is authenticated in your application): A feature introduced in version 10.6 of the SDK allows you to create a Session Token for a Signer using the Signers Email address, instead of having to use their Signer ID. This makes it much easier to request Session Tokens, as you don't need to track the Signer Id in order to make the request - simply use their Email address. For example, you might not want to generate custom Signer Id's and manage them in your integration layer. Instead, you simply let e-SignLive generate a random SIgner Id in the background. Instead of this:
        EslClient eslClient = new EslClient( API_KEY, API_URL );
        // Build the DocumentPackage object
        DocumentPackage documentPackage = newPackageNamed( "Policy " + format.format( new Date() ) )
                .withSigner( newSignerWithEmail( "[email protected]" )
                        .withCustomId( "Client1" )
                        .withFirstName( "John" )
                        .withLastName( "Smith" ) )
                .withSigner( newSignerWithEmail( "[email protected]" )
                        .withFirstName( "Patty" )
                        .withLastName( "Galant" ) )
                .withDocument( newDocumentWithName( "Document A" )
                        .fromFile( "res/document.pdf" )
                        .withSignature( signatureFor( "[email protected]" )
                                .onPage( 0 )
                                .atPosition( 100, 100 ) ) )
                .withDocument( newDocumentWithName( "Document B" )
                        .fromFile( "res/document.pdf" )
                        .withSignature( signatureFor( "[email protected]" )
                                .onPage( 0 )
                                .atPosition( 100, 100 ) ) )
                .build();
 
        // Issue the request to the e-SignLive server to create the DocumentPackage
        PackageId packageId = eslClient.createPackage( documentPackage );
 
        System.out.println( "PackageId: " + packageId );
 
        // Send the package to be signed by the participants
        eslClient.sendPackage( packageId );
 
        String pkgId = packageId.toString();
        // Optionally, get the session token for integrated signing.
        SessionToken sessionToken = eslClient.getSessionService().createSessionToken( pkgId, "Client1" );
You can do this (the easier way):
        EslClient eslClient = new EslClient( API_KEY, API_URL );
        // Build the DocumentPackage object without creating a custom signer id
        DocumentPackage documentPackage = newPackageNamed( "Policy " + format.format( new Date() ) )
                .withSigner( newSignerWithEmail( "[email protected]" )
                        .withFirstName( "John" )
                        .withLastName( "Smith" ) )
                .withSigner( newSignerWithEmail( "[email protected]" )
                        .withFirstName( "Patty" )
                        .withLastName( "Galant" ) )
                .withDocument( newDocumentWithName( "Document A" )
                        .fromFile( "res/document.pdf" )
                        .withSignature( signatureFor( "[email protected]" )
                                .onPage( 0 )
                                .atPosition( 100, 100 ) ) )
                .withDocument( newDocumentWithName( "Document B" )
                        .fromFile( "res/document.pdf" )
                        .withSignature( signatureFor( "[email protected]" )
                                .onPage( 0 )
                                .atPosition( 100, 100 ) ) )
                .build();
 
        // Issue the request to the e-SignLive server to create the DocumentPackage
        PackageId packageId = eslClient.createPackage( documentPackage );
 
        System.out.println( "PackageId: " + packageId );
 
        // Send the package to be signed by the participants
        eslClient.sendPackage( packageId );
 
        String pkgId = packageId.toString();
        // Optionally, get the session token for integrated signing - use the signers email address .
        SessionToken sessionToken = eslClient.getSessionService().createSessionToken( pkgId, "[email protected]" );

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off