03 · RP API v3

One session. Three flows.

The relying party (RP) opens a session, delivers a request to the user's phone and gets the answer by long-poll. v3 (current spec 3.2.7) adds device-link flows and strengthens fraud protection. e-ID Mongolia's RP-API has the same structure.

Flows

Ranked by fraud resistance

This is how SK itself ranks the flows: strongest is the user opening the link themselves, weakest is push alone.

Strongest

Device link

QR (another device) or Web2App / App2App (same device). The session is bound to that device. Anonymous authentication is possible.

Improved

QR + push

Combines a push to a known device with a QR code.

Weakest

Push only

Sends a notification by registration number. Relies on the user spotting fraud — the verification code matters here.

Endpoints

Key v3 paths

MethodPathPurposee-ID MN
POST/authentication/device-link/anonymousQR / Web2App / App2App authenticationyes
POST/authentication/device-link/etsi/{id}A specific person, device linkyes
POST/authentication/notification/etsi/{id}Push authenticationyes
POST/authentication/notification/document/{doc}Push, by document numberyes
POST/signature/device-link/…Signature, device linkyes
POST/signature/notification/…Signature, pushyes
POST/signature/certificate-choice/…Certificate choiceyes
GET/session/{sessionID}?timeoutMs=Long-poll, ≤ 120 syes
POST/authentication/qr“My QR” — a person shares their data as a JWSMN only

Smart-ID: rp-api.smart-id.com/v3/, demo sid.demo.sk.ee/smart-id-rp/v3/. e-ID Mongolia: rp.eidmongolia.mn, discovery ca.eidmongolia.mn/.well-known/eid.

Protocol

ACSP_V2 and RAW_DIGEST

  • ACSP_V2 (authentication): the RP sends a 64-byte random rpChallenge. The data to be signed joins fields such as smart-id|ACSP_V2|serverRandom|rpChallenge|userChallenge|rpName|…|interactions|flowType into one string.
  • RAW_DIGEST_SIGNATURE (signature): the RP computes the document hash in advance and sends it. The document itself is never transmitted.
  • Algorithms: v3 recommends RSASSA-PSS, with SHA-2 and SHA-3. PKCS#1 v1.5 for the legacy format.
  • Since v3.2.0, codes 471/472 are replaced by 404 + RFC 9457 problem details, and HTTP/2 is supported.
Device link

Link structure

deviceLinkBase?
deviceLinkType=QR|Web2App|App2App
&elapsedSeconds=n(QR only)
&sessionToken=…
&sessionType=auth|sign|cert
&version=1.0
&lang=…
&authCode=HMAC-SHA256(sessionSecret, payload)
  • The QR code is regenerated on the backend every second.
  • sessionSecret never reaches the frontend.
  • Authentication can be anonymous; signing cannot.
Interactions and SDKs

What shows on the phone

TypeTextDevice linkPush
displayTextAndPIN60 characters✓✓
confirmationMessage200 characters✓✓
…AndVerificationCodeChoice200 characters, pick from 3 codes—✓
LanguageSmart-IDe-ID Mongolia
JavaOfficial, v3—
TypeScript / NodeCommunity, v3Official, full + lite
GoCommunity, v2Official, full
.NETCommunity, v2PAdES · QR, partial
PHPOfficial, v2 authentication—