demo · v143

Smart Card Connect

Probes navigator.smartCard, lists readers, and sends an APDU you choose. If your environment isn’t cleared for the API, each step reports back exactly what fails — useful for diagnosing the gating.

permissioned API — the Web Smart Card API is exposed only to Isolated Web Apps with the smart-card permission policy. In a regular secure context navigator.smartCard will be absent and the steps below will say so.

capability probes

send an APDU

step 1 — establishContext

not run yet

step 2 — listReaders

not run yet

step 3 — reader.connect

not run yet

step 4 — connection.transmit

not run yet

the call

const ctx = await navigator.smartCard.establishContext();
const readers = await ctx.listReaders();
const conn = await readers[0].connect("shared");
const resp = await conn.transmit(apduBytes);  // Uint8Array

see also