Begin passkey registration
Starts a WebAuthn registration ceremony for the user and returns the
creation options for navigator.credentials.create(). Complete the
ceremony with POST /users/{user_id}/passkeys/registrations/{registration_id} within
five minutes. Credentials already registered for the user are excluded
automatically.
oauth2 user.writeAuthorizationBearer <token>Scope: user.write
user_id*stringThe unique identifier of the user.
^user_[a-zA-Z0-9_-]+$application/json- body
Request to begin a WebAuthn registration ceremony for the user.
Management callers are not browsers, so the relying-party parameters cannot be derived from an Origin header and must be supplied explicitly.
rp_id*stringRelying Party ID the credential is scoped to.
1 <= lengthrp_origins*array<>Allowed origins for this ceremony's attestation.
1 <= itemsusername?stringBrowser-visible account label for the credential picker. Optional: when omitted, a neutral default is used.
display_name?stringBrowser-visible display name. Optional; defaults to the username.
The registration ceremony was started
application/json- response
The started registration ceremony.
registration_id*stringIdentifier of this ceremony. Pass it back on
POST /users/{user_id}/passkeys/registrations/{registration_id} together with the
attestation.
options*The PublicKeyCredentialCreationOptions object, passed directly to the
browser's navigator.credentials.create().
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080", token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});const userPasskeyRegistration = await client.beginUserPasskeyRegistration( "user_01KWH3B72K7M7F0N9WD3P2E4YM", { rp_id: "string", rp_origins: ["http://example.com"] },);{ "registration_id": "string", "options": {}}Was this helpful?