Skip to main content

mObywatel

The following page contains step by step description of integration with asynchronous mObywatel strategy via the headless API.

Creating Conversation

We use the same conversation creation endpoint as usually. All you need to be aware of is providing countryCode attribute in settings section. This attribute MUST contain one of the two alpha2 country codes PL. Setting this value allows precise method selection in verification process right in its beginning.

{
  "userKey": "7dfb9ded-c38f-49ae-95e2-307283a0b1f6",
  "returnUrl": "https://sandbox.authologic.com/tests/return/?conversation={conversationId}",
  "strategy": "public:mobywatel",
  "query": {
    "identity": {
      "requireOneOf": [["PERSON_NAME_FIRSTNAME", "PERSON_NAME_LASTNAME"]]
    }
  },
  "settings": {
    "countryCode": "PL"
  }
}

In the response you will receive common values:

{
  "id": "9711e1db-7eea-4a19-a05d-4729512e3626",
  "userKey": "7dfb9ded-c38f-49ae-95e2-307283a0b1f6",
  "url": "https://id.sandbox.authologic.com/c/9711e1db-7eea-4a19-a05d-4729512e3626",
  "status": "CREATED",
  "result": {
    "identity": {
      "status": "IN_PROGRESS",
      "user": {}
    }
  }
}

Process Initiation

Now you need to initialize interaction with verification process. All you need to do is just call /api/conversations/{conversationId}/headless endpoint.

Example below:

curl -u my_login "https://sandbox.authologic.com/api/conversations/9711e1db-7eea-4a19-a05d-4729512e3626/headless" \
-H "Accept: application/vnd.authologic.v1.1+json" \
-H 'X-User-IP: XXX.X.X.X' \
-H "Content-Type: application/vnd.authologic.v1.1+json"

What you can expect is response like this:

{
  "component": "MOBYWATEL/REDIRECT_TO_APP",
  "next": "712eacdc-e859-4ce4-8e91-272daad7dbe8",
  "args": {
    "redirectUrl": "bW9ieXdhdGVsOi8vYXBwL2luc3RpdHV0aW9ucz9xckNvZGU9ODtEOzE7Ozs3Mzg7Ozk5NzdhNDEzLTdiOWUtNDgwYS05ZjJlLTViNzI1ZjJmMzQzNjsxNzY0MTYxNDMwOzE3NjQxNjIwMzA7NDViN2U5ZTQtMzIwNi00NGJkLTg2MmMtOTg0YmQ1OGYxYmFkOzA7NTs7",
    "qrCode": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAACA0lEQVR4Xu2W4WosIQxGA76WkFcP5LUE73fiTGkv9F+EFiqz7m6OYBK/xLH93bD/DR/jj/x4EmZj2ci95pxjTcdwgaSelN017fDNV94gMVIeBJvvGMdwiRwP9FOx3iRraN5l14pLRE8qSgLdi0jraScIIj+PL9rpIzWORUmts3sU30ui1GESutI5pX4J368QUzVRU5MQOUQ8aSe5PETMfDknF/Wjn1QKJZGpgPVHU74KaSUSeBCrFoT0KPlPe3zrJajdNSunA+2LXSFZwdFkZXe6k0LvJ7KVB34ilBpZ2E/WoKRWyVCpHepL+NBOUtdE0uyA0qJTzVcI9xGWoK44yVchrYRK4tBQCmGPNd7KaiXV9TbaUMzaPHw9HvSS998gQtKr7J6M9hI6nivcXX6ovmw+HvSSpD9Mr4ySV3nwVnAzkd5pScbmXxTfSxTsqIQqsbUunwruJac1BFXF11DE89FOL0k+df/JDUWN7i+QRSNyLqiksKahmAukBFHKqNuW3ucno70kidPp53IiypVXib1E5Tt5LcEWXB75ZLSZkEdBG3jC9V5iaSeMc2MomSzbdMJ+oh05q9LgeUVBMP2Ek6u+eiqK+v3IaCuJejflxBSskVGBW2TjAUemxjf9ZPQCOU1CGjTNWneDAMswyw9auV8gpZBzYwDYPY8HveSb8Ud+K/kH7fhxZO0jpwsAAAAASUVORK5CYII=",
    "validTo": "1764162030"
  }
}

This means that verification method is MOBYWATEL and current action that you need to perform in your UI is REDIRECT_TO_APP. Value taken from redirectUrl attribute contains base64 encoded deepLink to mObywatel App. Value taken from qrCode attribute contains base64 encoded string of PNG image which may by displayed to the user to be scaned by mObywatel App. Value taken from validTo attribute contains timestamp when a verification token used to creat deepLink and qrCode image expires.

Your system is responsible for displaying qrCode image to the user or perform redirection to mObywatel App using redirectUrl value. Your system is also responsible for checking that validTo value is not expired. You are able to renew token by calling /api/conversations/{conversationId}/headless/{next} endpoint at least 20 seconds before its expiration time. next parameter value should be taken from the response from /api/conversations/{conversationId}/headless endpoint.`

Example below:

curl -X POST -u my_login "https://sandbox.authologic.com/api/conversations/9711e1db-7eea-4a19-a05d-4729512e3626/headless/712eacdc-e859-4ce4-8e91-272daad7dbe8" \
-H "Accept: application/vnd.authologic.v1.1+json" \
-H 'X-User-IP: XXX.X.X.X' \
-H "Content-Type: application/vnd.authologic.v1.1+json" \
-d "{}"

Moving forward with the process

Once the user scans the code or the user is redirected to the mObywatel App, all you need to do is wait for the user to complete the verification process or renew the token.

All you need to do is just call /api/conversations/{conversationId}/headless/{next} endpoint. In case the user finished the verification process, the callback will contain the following response:

{
  "component": "GLOBAL/ACCEPTED"
}

We are taking care of the rest. This means that you should already receive a callback with conversation results from Authologic.

Despite our sincere intentions, it is difficult to create perfect technical documentation. If you have an idea on how to improve this documentation, or you have trouble understanding any section, please email us at tech-support@authologic.com
Was this page helpful?
Powered by Authologic Nisaba