Blog
Home/

Retrieving ID verification data

Jonathan Sammons

Jonathan Sammons

Developer Support Engineer

Summary3 min read

Learn how to retrieve a recipient’s ID verification information after they have provided it.

    • Getting started
    • Code example:
    • Additional resources
    Table of contents
    en-US

    In a previous blog post, I wrote about how you can create an envelope with identity verification applied to a recipient, so that they must authenticate using a government-issued ID. In this post, I’m going to discuss how you can retrieve the information that the recipient provided, in the event that you need to store this for any of your own internal processes. 

    Getting started

    First, you will need to enable ID evidence storage to store recipient identity information after they have provided it. You can do this by logging into a Docusign account with identity verification available as an admin and going to Settings > Identity Verification.

    In the Identity Verification settings, you will need to edit the identity verification configuration that you would like to use, or create a new one if you don’t have edit rights on any of the existing configurations. Once you are editing the configuration that you’d like to use, you will then need to ensure that the checkboxes for “Front side of the ID” and “Back side of the ID” under the Data to save from each Photo ID or Passport verification section.

    Next, you will need an envelope successfully signed by a recipient who was assigned the identity verification that you configured. This blog won’t provide any code examples for actually creating the envelope with identity verification for the recipient; if you need any resource for that, please see the link at the top of this blog or refer to our how-to guide.

    Code example:

    After the above steps have been completed, you can start the process of requesting the identity information. I will be using Postman for my examples. The first step is to perform the listRecipients information request for the envelope. You do this to get the recipientIdGuid parameter for the recipient whose identity information you want to retrieve.

    Step 1:

    Request:

    GET https://demo.docusign.net/restapi/v2.1/accounts/{{accountId}}/envelopes/ {{envelopeId}}/recipients

    Example response:

    Step 2:

    After retrieving the recipientIdGuid, you can generate your resource token and ID Evidence API base URI. The resource token is a special Authorization token that is used with the ID Evidence API to authenticate calls. A recipientIdGuid for a recipient that has signed with identity verification is required to generate it. The token only lives for two minutes, so you will need to use it quickly in the subsequent calls or you will have to generate it more than once.

    Request:

    POST https://demo.docusign.net/restapi/v2.1/accounts/{{accountId}}/envelopes/ {{envelopeId}}/recipients/{{recipientIdGuid}}/identity_proof_token

    Expected response:

    Step 3:

    Using the new base URI and resource token that was generated, you can now make an API call to the ID Evidence API endpoint for event data. This will return the identity events from the envelope for the specified recipient. Ensure that you pass the Authorization header as you would using OAuth, so Bearer should precede the token, like this: Authorization: Bearer {{resourceToken}}

    Request:

    GET https://proof-d.docusign.net/api/v1/events/person/{{recipientIdGuid}}.json

    Expected response:

    Step 4:

    Finally, you can make an API call to the copy_of_id_front and copy_of_id_back URIs that were returned in the previous response to get the Base64-encoded version of the image of the recipient's identity that they uploaded. You can then Base64-decode the returned string for the image, which will have a honeycomb pattern overlaid on the image so that it cannot be used anywhere else.

    Additional resources

    Jonathan Sammons

    Jonathan Sammons

    Developer Support Engineer

    More posts from this author

    Related posts

    • Developers

      Developer Spotlight: John Santos, Pacific Life

      Matthew Lusher

      Matthew Lusher