This topic contains 10 replies, has 2 voices, and was last updated by  Duo_Liang 6 days, 3 hours ago.

  • Author
    Posts
  • Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Guys,

    We are looking at this page for creating the Auth token for a user.

    https://docs.esignlive.com/content/c_integrator_s_guide/rest_api/authentication_tokens.htm?Highlight=user%20authentication#Create

    We have to do a POST request to this api call.
    /authenticationTokens/user

    The documentation says that either a Cookie header or an Authorization header is required.

    I am curious to know, where do we get the value for the SessionId in the cookie example below.
    Cookie: ESIGNLIVE_SESSION_ID=cdf5b882667d24a2

    We are trying to get a user authentication for our Notary so that when they click the link, it will take them directly into the signing room.

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 531

    Score

    0

    Hi Ryan,

    Below API will work for retrieving Session Token/ID by Authentication Token:

    GET {endpoint}/auth?signerAuthenticationToken={AuthenticationToken}

    To note:
    1. This API doesn’t start with /api
    2. You need to use the Authentication Token (retrieved from the documentation you linked) as the input parameter.
    3. Authentication Token contains upper characters and session token doesn’t, so it’s easy to tell from them.

    Hope this could help!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Score

    0

    Duo,

    I am a bit confused on this.

    Are you saying that in order to get the session id that will be used to generate an Auth Signing link for a user, I must first, get an auth token and then hit the auth?signer… API? I then take that value and hit the /authenticationTokens/user api with that session id to get the Auth Signing link?

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 531

    Score

    0

    Hi Ryan,

    Sorry for the confusion, I missed your scenario yesterday.

    The following is the steps to achieve “generate an URL leading notary directly to the Signing Room”
    #1. generate a sender token or user token, here’s the API for sender token:

    HTTP Request
    POST /api/authenticationTokens/sender
    
    HTTP Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Basic api_key
    
    Request Payload
    {
       "packageId: "5vjLRY5MWrDJ6MzRAEyCKOy5IH0="
    }
    Response Payload
    
    {
       "value": "MjY0MjQ4MzgtMTJlOS00MzhjLTgzODMtMzJmMGNiZTg3ODBl"
    }

    The difference between sender token and user token is, user token contains access to the whole account while sender token only has access to the specific package, so it’s better in this scenario

    #2. build below url:

     https://sandbox.esignlive.com/auth?authenticationToken=NTkxZmQ1Y2EtYzc5OC00MmQxLWE5YWItMDIxOGRkNDYxY2Qz&target=https://sandbox.esignlive.com/a/transaction/Sn26VSXicuT9_TngE8EEzp9_U7w=/sign

    (1)please replace the endpoint
    (2)as you can notice, the url seperates into two parts:
    https://sandbox.esignlive.com/auth?authenticationToken=NTkxZmQ1Y2EtYzc5OC00MmQxLWE5YWItMDIxOGRkNDYxY2Qz
    &target=https://sandbox.esignlive.com/a/transaction/Sn26VSXicuT9_TngE8EEzp9_U7w=/sign
    The first part contains the credential logging into the account, and the second part is the target after logging in, we just put the potential Signing Room Url.

    Hope this could help!
    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Score

    0

    Duo,

    In this case, the owner of the account is not the notary on the account. When I build the signing url this way, it takes me in as the owner which cannot do anything other than view the package.

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 531

    Score

    0

    Hi Ryan,

    Yes, you are right, I missed that point. Apologize for that.

    Just one quick question, is your notary sender under your main account? Because to get access to Notary Signing Room, the notary has to log in first, which means you either has his/her API Key or username&password as a credential.

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 6 days, 4 hours ago by  Duo_Liang.
    Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Score

    0

    Duo,

    The notary might or might not be under the main account. For testing purposes right now, they are. But not all the notary accounts will be.

    Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Score

    0

    Duo,

    Just out of curiosity, how do I get a user token? I know I can get the sender and account owner token, but nothing on the user.

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 531

    Score

    0

    Hi Ryan,

    In order to log in on behalf of your notary, you must have his/her API key or login credentials.

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist
    Participant
    Ryan_Coleman
    Senior Member
    Member since: 16.07.2018
    Number of posts: 77

    Score

    0

    Duo,

    So if we create the package and upload all the documents under our API key, we will still need their API to generate a user token?

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 531

    Score

    0

    Hi Ryan,

    I’m afraid so. I just tested with a 3rd-party notary, the notary can view the package through dashboard and API, but can’t modify the package. Which means you still own the package but Signing Room has to be accessed from notary’s account. So from my understanding, the notary’s credentials is a MUST when generating the URL.

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist

You must be logged in to reply to this topic.