gurvinder

Invalid Session Token

0 votes
Hi There, I am trying to create session token to access the eSignature in an iframe. I am using the following code to generate and send the document: DocumentPackage documentPackage = newPackageNamed( PackageName ) .withSigner( newSignerWithEmail( SignerEmail ) .withCustomId( SignerId ) .withFirstName( FirstName ) .withLastName( LastName ) ) .withDocument( newDocumentWithName( DocumentName ) .fromStream(file, DocumentType.PDF) .withSignature( initialsFor( InitialsFor ) .onPage( PageToSign ) .atPosition( XPostion, YPostion ) )) .build(); PackageId packageId = eslClient.createPackage( documentPackage ); eslClient.sendPackage( packageId ); And I'm using the following code to generate the Token: SessionToken sessionToken = client.getSessionService().createSessionToken(packageId , SignerId ); result.outParamToken = sessionToken.getSessionToken(); But when I try to access the page using the token I get an error saying: Unauthorized Access, Your authenication token was incorrect. Can anyone please tell me what am I doing wrong here. The URL that I generate looks like the image attached.

Attachments
URL.png2.49 KB
Approved Answer

Reply to: Invalid Session Token

0 votes
Hi Gurvinder, Try removing the hyphen in "e-signlive". In other words, the source URL in your iframe should be: https://sandbox.esignlive.com/access?sessionToken={sessionToken}.
Haris Haidary OneSpan Technical Consultant

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