## First steps

There are few things before you get started...

Prerequisites for integrating ZealiD:

  • Have ZealiD app

    • Receive your client_id and client_secret

    • use HMAC_STRING generator to be able to generate hmac_string for Authentication header in your requests

    • use HMAC_REQUEST to generate and send an authenticated request

Below you can find a couple of different scripts for generating hmac_string or for sending hmac requests

ο»Ώ

## How to use hmac_string generation script

How to:

  • hmac_string generation script returns to you an hmac string that you need to include in the request Authentication header

  • hmac_string generation requires the whole request information

  • For more information about hmac and it's usage please refer to [hmac guide](πŸ”—ο»Ώ)ο»Ώ

Be aware!

  • For all examples we expect you to pass payload as **JSON**!

    • Your request is expected to have **Content-Type: application/json** in headers!

    • HMAC_STRING value can be different depending if json is sorted or not

    • We recommend using hmac_string generators to generate hmac_string for API Reference tests

ο»Ώ

## How to use HMAC request generation script

How to:

  • HMAC request generation scripts accept input in the same format as hmac_string generators

  • HMAC request generators actually executes HTTP(S) request with HMAC authentication

Be ware!

  • For all examples we expect you to pass payload as **JSON**!

  • HMAC_STRING value can be different depending if json is sorted or not

ο»Ώ

## Retrieve your customer data and get ready for signing

To be able to upload, sign or retrieve documents or data, first of all, you need to authenticate yourself as a user

Prerequisites for actions with documents:

  • Scan QR code with ZealiD app

  • ο»Ώ[Retrieve your temporary HERMES_TOKEN](πŸ”—ο»Ώ)ο»Ώ

  • ο»Ώ[Retrieve your personal data and customer_id](πŸ”—ο»Ώ)ο»Ώ

  • Be aware - you will need this **customer_id** for actions with documents

## Generating authentication QR code

How to:

  • QR code scanning is initial step of your authentication which helps to map your identity with the help of your device

  • To be able to scan QR code you need the ZealiD app and successfully pass onboarding steps

Be aware!

  • your_client_id - The same client_id as you provide for HMAC authentication

  • After scanning qrcode and successfully confirming your authentication request you will be **redirected** and you will receive **HERMES_CODE** as **url parameter**

  • *_Make sure you are targeting correct environment! _

ο»Ώ
665
ο»Ώ

**Steps:** 1 - 2. Use the url provided above to GET a template with QR code 3 - 4. While QR code is on your screen - JS in browser is checking request status in server 5 - 7. Scan QR code with Your ZealiD App and confirm request with TouchiD or FaceiD

  1. After successful confirmation you will be redirected and in new url you can find code=HERMES_CODE -> This is the HERMES_CODE that you will have to provide in [get_token](πŸ”—ο»Ώ) request

**Expected response:** https://core-hermes.zealid.com/mediator/web_embed/auth_link/success/OKQQJZuQQWsh-DclxhwZDdo_DCd7LOSaqinIIjA35Ms?code=hermes_code_xHVSIv-A...

## You are ready!

Congratulations!

  • You now have HERMES_CODE which you can use to finish your authentication process and start working with your documents

  • For further actions please refer to any of these documentations:

    • ο»Ώ[DATA API in detail](πŸ”—ο»Ώ) documentation where you can find all API calls explained

    • ο»Ώ[API reference](πŸ”—ο»Ώ) if you are more experience user

    • Or [hmac_request examples](πŸ”—ο»Ώ) in this guide if you want to jump directly on testing from your computer