Skip to main content

XMDT (Identity Verification)

XMDT is identity verification for copub games: full name, date of birth, phone number (OTP-verified), and consent. It is a separate, standalone SDK — alogame-kyc-sdk — not part of SDK v2 and not something you get by integrating v2.

Environments
EnvironmentBase URL
Devhttps://api-xmdt.dev.alogame.vn
Prodhttps://api-xmdt.alogame.vn

Both are live. Your gameId must be enabled for XMDT by Alogame Operations before either works — see Server Integration.

Versions​

PlatformLatestMinimum
Android1.2.11.0.0
iOS1.2.11.0.0
Unity0.3.00.1.4

Releases below the minimum send production traffic to a host that does not exist. The SDK then shows "Không có kết nối mạng" (no network connection) on every device, and Thử lại (Retry) does nothing. Update and rebuild before you test production.

What changed in Android 1.2.1, iOS 1.2.1 and Unity 0.3.0 (no API change; update to get the trial-period button):

  • Optional mode has a labelled Bỏ qua (Skip) button instead of the ✕. The result is still Cancelled. This is the button players use to skip XMDT during a trial period.
  • The screen follows the device language: Vietnamese on a device set to Vietnamese, English on any other. The consent items keep the wording the server sends.
  • iOS, Objective-C: before 1.2.1, a game calling showFromViewController:objcListener: never received onResultWithStatus:reason:message:. See Objective-C.

What changed in Android 1.1.0, iOS 1.1.0 and Unity 0.2.0:

  • "Thoát game" (Exit game) now closes the game. In mandatory mode, a player who confirms Thoát game gets the new result ExitRequested, and the SDK closes the game about 0.5 s later. Before, the result was Cancelled and the game kept running. See "The Thoát game button" on each platform page.
  • In optional mode, the close confirmation button now reads Đóng (Close) instead of "Thoát game". The result is still Cancelled.
  • A server failure that ends the attempt now stays on screen with a support code ("Mã lỗi: …" — error code). Your game receives Failed only after the player taps Đóng. Before, the screen closed with no message.
  • iOS 1.1.0 also includes the fixes Android got in 1.0.2: a refused OTP send or check keeps the player on the screen, and "Không có kết nối mạng" (no network connection) appears only when the network could not be reached.
ExitRequested needs a code change

AlogameKycResult has a new case. A Kotlin when used as an expression, or a Swift 6 switch with no @unknown default, stops compiling until you handle it. Java and C# still compile but skip it silently; Swift 5 compiles with a warning. Add the branch on every platform, and never treat ExitRequested as success.

What it looks like​

The SDK's own screen — a bottom sheet in portrait, a centered dialog in landscape. Identical on Android and iOS.

XMDT screen, portraitXMDT screen, landscape

Why this exists​

Player identity data (name, date of birth, phone) must never transit your game server. Copub game servers are self-hosted and outside Alogame's control, so there is no way to audit what a game server logs or retains. XMDT's entire design point is that this data goes device → Alogame directly, and your server's only involvement is one signed call that never carries any of it.

Who implements what​

ImplementsSees player PII?
Your game serverOne signed HTTP call to mint a session token — its response also tells you whether the player is already verifiedNo
Your game client (Android/iOS)Three SDK calls: init, setGameRole, showNo — the SDK owns its own screen
Player's deviceEverything else — the actual name/DOB/phone/OTP form—

Your client never talks to Alogame's identity API directly, and your server never sees a name, date of birth, phone number, or OTP code. Both sides only ever handle opaque tokens.

The flow​

The last step is a UI signal, not proof: a modified client can report Success at will. Don't gate on it alone — at the actual point you need to trust the answer (letting a player into a match, for example), call POST /xmdt/session again and read xmdtCompleted from that response. It's the same HMAC-signed, server-to-server call either way; the field is authoritative because it comes straight from Alogame, never relayed through the player's device. See Server Integration.

Next steps​

  • Server Integration — the one call your server makes, both to mint a session and to check real verification status.
  • Android — SDK install and the three-call integration.
  • iOS — SDK install and the three-call integration.
  • Unity — UPM package wrapping both native SDKs; no Gradle or Xcode editing.
  • Cocos Creator — pure TypeScript, no native code at all; runs in the Editor without a device.

When to call show()​

This is entirely your decision — the SDK does not enforce a gate and Alogame's XMDT server does not know or care when you call it. Common choices:

  • At first login, before letting a new player into the game.
  • Before a player's first purchase.
  • From a settings/account menu, optionally.

Whichever you choose, the session your server mints tells the SDK whether the form is dismissible (xmdtRequired) — see Server Integration.

Gate entry with xmdtCompleted || !xmdtRequired, not with xmdtCompleted alone: a game can give new players a trial period in which XMDT can be skipped.