- API-Referenz
- Benutzer
- Create a challenge to register a new passkey
Create a challenge to register a new passkey
Confirm your identity with the password and, if a second factor is set up, with multiFactorCode or passkeyCredential.
Request
- multiFactorCodestring (≥ 6 Zeichen, ≤ 16 Zeichen)
A TOTP code or recovery code.
- passkeyCredentialobject
A passkey assertion that proves the second factor.
challengeIdcomes fromPOST /users/self/passkey-challenges(or frompasskeyChallengeofPOST /authenticateforPOST /authenticate-mfa),credentialis thecredential.toJSON()of thenavigator.credentials.get()call with itsoptions.- challengeIdstring (uuid)required
- credentialobjectrequired
A passkey assertion: the result of
navigator.credentials.get()serialized withcredential.toJSON(), as WebAuthn Level 3AuthenticationResponseJSON. Send it unchanged. Binary values are base64url-encoded without padding.- authenticatorAttachmentstring
platformorcross-platform, if the browser reports it. - clientExtensionResultsobjectrequired
WebAuthn Level 3
AuthenticationExtensionsClientOutputsJSON. - idstringrequired
The credential id, base64url-encoded without padding.
- rawIdstringrequired
The credential id, base64url-encoded without padding (same value as
id). - responseobjectrequired
WebAuthn Level 3
AuthenticatorAssertionResponseJSON.- authenticatorDatastringrequired
The authenticator data, base64url-encoded without padding.
- clientDataJSONstringrequired
The client data (type, challenge, origin) as JSON, base64url-encoded without padding.
- signaturestringrequired
The assertion signature, base64url-encoded without padding.
- userHandlestring
The
user.idof the registration, base64url-encoded without padding. The passkey login (POST /authenticate-passkey) takes the user from it.
- typestringrequired
The credential type, always
public-key.
- passwordstringrequired
The password of the user.
Content-Type: application/json
{
"multiFactorCode": "123456",
"passkeyCredential": {
"challengeId": "6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11",
"credential": {
"authenticatorAttachment": "platform",
"clientExtensionResults": {},
"id": "AN29uP9UVfVZ1X0WLKg3zA",
"rawId": "AN29uP9UVfVZ1X0WLKg3zA",
"response": {
"authenticatorData": "8q2Xwa9qKcqUca3Qox8O-H9rqwjlNp1O5WHPOETZnigdAAAAAA",
"clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoicmNVYTE2MzRZVWFDc0JlYXNyb1RWdWRCYjRqTlNuS3pUR3pKOUVkTGxyQSIsIm9yaWdpbiI6Imh0dHBzOi8vc3R1ZGlvLm1pdHR3YWxkLmRlIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ",
"signature": "MEUCIQD7nQ352E7fNAwHcgq5mMDsoeHQ0odAgekdw9tbs-Lc1gIgSBt2yLdJV_AcNx76CMsEP-S7LoJ_E0q-y19EAEWtwLI",
"userHandle": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx"
},
"type": "public-key"
}
},
"password": "string"
}
{
"properties": {
"multiFactorCode": {
"description": "A TOTP code or recovery code.",
"example": "123456",
"maxLength": 16,
"minLength": 6,
"type": "string"
},
"passkeyCredential": {
"description": "A passkey assertion that proves the second factor. `challengeId` comes from `POST /users/self/passkey-challenges`\n(or from `passkeyChallenge` of `POST /authenticate` for `POST /authenticate-mfa`), `credential` is the\n`credential.toJSON()` of the `navigator.credentials.get()` call with its `options`.\n",
"properties": {
"challengeId": {
"example": "6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11",
"format": "uuid",
"type": "string"
},
"credential": {
"description": "A passkey assertion: the result of `navigator.credentials.get()` serialized with\n[`credential.toJSON()`](https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson), as WebAuthn Level 3\n[`AuthenticationResponseJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-authenticationresponsejson). Send it\nunchanged. Binary values are base64url-encoded without padding.\n",
"example": {
"authenticatorAttachment": "platform",
"clientExtensionResults": {},
"id": "AN29uP9UVfVZ1X0WLKg3zA",
"rawId": "AN29uP9UVfVZ1X0WLKg3zA",
"response": {
"authenticatorData": "8q2Xwa9qKcqUca3Qox8O-H9rqwjlNp1O5WHPOETZnigdAAAAAA",
"clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoicmNVYTE2MzRZVWFDc0JlYXNyb1RWdWRCYjRqTlNuS3pUR3pKOUVkTGxyQSIsIm9yaWdpbiI6Imh0dHBzOi8vc3R1ZGlvLm1pdHR3YWxkLmRlIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ",
"signature": "MEUCIQD7nQ352E7fNAwHcgq5mMDsoeHQ0odAgekdw9tbs-Lc1gIgSBt2yLdJV_AcNx76CMsEP-S7LoJ_E0q-y19EAEWtwLI",
"userHandle": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx"
},
"type": "public-key"
},
"properties": {
"authenticatorAttachment": {
"description": "`platform` or `cross-platform`, if the browser reports it.",
"example": "platform",
"type": "string"
},
"clientExtensionResults": {
"description": "WebAuthn Level 3\n[`AuthenticationExtensionsClientOutputsJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-authenticationextensionsclientoutputsjson).\n",
"type": "object"
},
"id": {
"description": "The credential id, base64url-encoded without padding.",
"example": "AN29uP9UVfVZ1X0WLKg3zA",
"type": "string"
},
"rawId": {
"description": "The credential id, base64url-encoded without padding (same value as `id`).",
"example": "AN29uP9UVfVZ1X0WLKg3zA",
"type": "string"
},
"response": {
"description": "WebAuthn Level 3\n[`AuthenticatorAssertionResponseJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-authenticatorassertionresponsejson).\n",
"properties": {
"authenticatorData": {
"description": "The authenticator data, base64url-encoded without padding.",
"type": "string"
},
"clientDataJSON": {
"description": "The client data (type, challenge, origin) as JSON, base64url-encoded without padding.",
"type": "string"
},
"signature": {
"description": "The assertion signature, base64url-encoded without padding.",
"type": "string"
},
"userHandle": {
"description": "The `user.id` of the registration, base64url-encoded without padding. The passkey login\n(`POST /authenticate-passkey`) takes the user from it.\n",
"type": "string"
}
},
"required": [
"clientDataJSON",
"authenticatorData",
"signature"
],
"type": "object"
},
"type": {
"description": "The credential type, always `public-key`.",
"example": "public-key",
"type": "string"
}
},
"required": [
"id",
"rawId",
"response",
"clientExtensionResults",
"type"
],
"type": "object"
}
},
"required": [
"challengeId",
"credential"
],
"type": "object"
},
"password": {
"description": "The password of the user.",
"type": "string"
}
},
"required": [
"password"
],
"type": "object"
}
Responses
The challenge has been created.
- challengeIdstring (uuid)required
- optionsobjectrequired
Options for registering a passkey, as WebAuthn Level 3
PublicKeyCredentialCreationOptionsJSON. Pass the object unchanged toPublicKeyCredential.parseCreationOptionsFromJSON() and the result aspublicKeytonavigator.credentials.create(). Send the resulting credential back ascredential.toJSON() together with thechallengeIdthe options came with. Binary values are base64url-encoded without padding.- attestationstringrequired
Always
none; the API does not check which authenticator model created the passkey. - attestationFormatsArray von string
Not set by this API.
- Array[
- *string
]
- authenticatorSelectionobjectrequired
Always a discoverable credential (
residentKey: required) with user verification (userVerification: required); noauthenticatorAttachment, so the browser also offers other devices (QR code).- authenticatorAttachmentstring
- requireResidentKeyboolean
- residentKeystring
- userVerificationstring
- challengestringrequired
32 random bytes, base64url-encoded without padding. Can be used once.
- excludeCredentialsArray von objectrequired
The passkeys the user already has for this relying party; the authenticator does not register them again.
- Array[
A passkey of the user, as WebAuthn Level 3
PublicKeyCredentialDescriptorJSON.- *object
A passkey of the user, as WebAuthn Level 3
PublicKeyCredentialDescriptorJSON.- idstringrequired
The credential id, base64url-encoded without padding.
- transportsArray von string
How the browser can reach the authenticator, as reported at registration (
internal,hybrid,usb,nfc,ble,smart-card).- Array[
- *string
]
- typestringrequired
The credential type, always
public-key.
]
- extensionsobject
WebAuthn Level 3
AuthenticationExtensionsClientInputsJSON. - hintsArray von string
Hints for the browser which authenticator to offer. Not set by this API.
- Array[
- *string
]
- pubKeyCredParamsArray von objectrequired
The accepted key types, ES256 (
-7) and RS256 (-257).- Array[
- *object
- algintegerrequired
A COSE algorithm identifier.
- typestringrequired
Always
public-key.
]
- rpobjectrequired
The relying party, selected from the
Originheader of the request that created the challenge.- idstringrequired
- namestringrequired
- timeoutintegerrequired
Milliseconds until the challenge expires.
- userobjectrequired
The user the passkey is created for, as WebAuthn Level 3
PublicKeyCredentialUserEntityJSON.- displayNamestringrequired
First and last name of the user, or the email address if both are empty.
- idstringrequired
The UTF-8 bytes of the user id, base64url-encoded without padding. A passkey login returns it as
response.userHandle. - namestringrequired
The verified email address of the user.
Content-Type: application/json
{
"challengeId": "6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11",
"options": {
"attestation": "none",
"authenticatorSelection": {
"requireResidentKey": true,
"residentKey": "required",
"userVerification": "required"
},
"challenge": "rcUa1634YUaCsBeasroTVudBb4jNSnKzTGzJ9EdLlrA",
"excludeCredentials": [
{
"id": "Y3JlZGVudGlhbC1pZA",
"transports": [
"internal"
],
"type": "public-key"
}
],
"extensions": {
"credProps": true
},
"hints": [],
"pubKeyCredParams": [
{
"alg": -7,
"type": "public-key"
},
{
"alg": -257,
"type": "public-key"
}
],
"rp": {
"id": "mittwald.de",
"name": "mittwald"
},
"timeout": 300000,
"user": {
"displayName": "Ada Lovelace",
"id": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx",
"name": "a.lovelace@example.com"
}
}
}
{
"description": "A challenge for registering a passkey. Run `navigator.credentials.create()` with `options` and send\n`challengeId` together with the resulting `credential.toJSON()` to `POST /users/self/passkeys`. The challenge\ncan be used once.\n",
"properties": {
"challengeId": {
"example": "6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11",
"format": "uuid",
"type": "string"
},
"options": {
"description": "Options for registering a passkey, as WebAuthn Level 3\n[`PublicKeyCredentialCreationOptionsJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialcreationoptionsjson).\nPass the object unchanged to\n[`PublicKeyCredential.parseCreationOptionsFromJSON()`](https://www.w3.org/TR/webauthn-3/#sctn-parseCreationOptionsFromJSON)\nand the result as `publicKey` to `navigator.credentials.create()`. Send the resulting credential back as\n[`credential.toJSON()`](https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson) together with the\n`challengeId` the options came with. Binary values are base64url-encoded without padding.\n",
"example": {
"attestation": "none",
"authenticatorSelection": {
"requireResidentKey": true,
"residentKey": "required",
"userVerification": "required"
},
"challenge": "rcUa1634YUaCsBeasroTVudBb4jNSnKzTGzJ9EdLlrA",
"excludeCredentials": [
{
"id": "Y3JlZGVudGlhbC1pZA",
"transports": [
"internal"
],
"type": "public-key"
}
],
"extensions": {
"credProps": true
},
"hints": [],
"pubKeyCredParams": [
{
"alg": -7,
"type": "public-key"
},
{
"alg": -257,
"type": "public-key"
}
],
"rp": {
"id": "mittwald.de",
"name": "mittwald"
},
"timeout": 300000,
"user": {
"displayName": "Ada Lovelace",
"id": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx",
"name": "a.lovelace@example.com"
}
},
"properties": {
"attestation": {
"description": "Always `none`; the API does not check which authenticator model created the passkey.",
"example": "none",
"type": "string"
},
"attestationFormats": {
"description": "Not set by this API.",
"items": {
"type": "string"
},
"type": "array"
},
"authenticatorSelection": {
"description": "Always a discoverable credential (`residentKey: required`) with user verification\n(`userVerification: required`); no `authenticatorAttachment`, so the browser also offers other devices\n(QR code).\n",
"properties": {
"authenticatorAttachment": {
"type": "string"
},
"requireResidentKey": {
"example": true,
"type": "boolean"
},
"residentKey": {
"example": "required",
"type": "string"
},
"userVerification": {
"example": "required",
"type": "string"
}
},
"type": "object"
},
"challenge": {
"description": "32 random bytes, base64url-encoded without padding. Can be used once.",
"example": "rcUa1634YUaCsBeasroTVudBb4jNSnKzTGzJ9EdLlrA",
"type": "string"
},
"excludeCredentials": {
"description": "The passkeys the user already has for this relying party; the authenticator does not register them again.",
"items": {
"description": "A passkey of the user, as WebAuthn Level 3\n[`PublicKeyCredentialDescriptorJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialdescriptorjson).\n",
"example": {
"id": "AN29uP9UVfVZ1X0WLKg3zA",
"transports": [
"hybrid",
"internal"
],
"type": "public-key"
},
"properties": {
"id": {
"description": "The credential id, base64url-encoded without padding.",
"example": "AN29uP9UVfVZ1X0WLKg3zA",
"type": "string"
},
"transports": {
"description": "How the browser can reach the authenticator, as reported at registration (`internal`, `hybrid`, `usb`,\n`nfc`, `ble`, `smart-card`).\n",
"example": [
"hybrid",
"internal"
],
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"description": "The credential type, always `public-key`.",
"example": "public-key",
"type": "string"
}
},
"required": [
"type",
"id"
],
"type": "object"
},
"type": "array"
},
"extensions": {
"description": "WebAuthn Level 3\n[`AuthenticationExtensionsClientInputsJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-authenticationextensionsclientinputsjson).\n",
"type": "object"
},
"hints": {
"description": "Hints for the browser which authenticator to offer. Not set by this API.",
"items": {
"type": "string"
},
"type": "array"
},
"pubKeyCredParams": {
"description": "The accepted key types, ES256 (`-7`) and RS256 (`-257`).",
"items": {
"properties": {
"alg": {
"description": "A COSE algorithm identifier.",
"example": -7,
"type": "integer"
},
"type": {
"description": "Always `public-key`.",
"example": "public-key",
"type": "string"
}
},
"required": [
"type",
"alg"
],
"type": "object"
},
"type": "array"
},
"rp": {
"description": "The relying party, selected from the `Origin` header of the request that created the challenge.",
"properties": {
"id": {
"example": "mittwald.de",
"type": "string"
},
"name": {
"example": "mittwald",
"type": "string"
}
},
"required": [
"name",
"id"
],
"type": "object"
},
"timeout": {
"description": "Milliseconds until the challenge expires.",
"example": 300000,
"type": "integer"
},
"user": {
"description": "The user the passkey is created for, as WebAuthn Level 3\n[`PublicKeyCredentialUserEntityJSON`](https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialuserentityjson).\n",
"properties": {
"displayName": {
"description": "First and last name of the user, or the email address if both are empty.",
"example": "Ada Lovelace",
"type": "string"
},
"id": {
"description": "The UTF-8 bytes of the user id, base64url-encoded without padding. A passkey login returns it as\n`response.userHandle`.\n",
"example": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx",
"type": "string"
},
"name": {
"description": "The verified email address of the user.",
"example": "a.lovelace@example.com",
"type": "string"
}
},
"required": [
"id",
"name",
"displayName"
],
"type": "object"
}
},
"required": [
"rp",
"user",
"challenge",
"pubKeyCredParams",
"timeout",
"excludeCredentials",
"authenticatorSelection",
"attestation"
],
"type": "object"
}
},
"required": [
"challengeId",
"options"
],
"type": "object"
}
An additional second factor code is necessary to process the request.
- *
Content-Type: application/json
null
{
"allOf": [
{
"properties": {
"info": {
"description": "A json object, given further information about the error",
"type": "object"
},
"message": {
"description": "Some more detailed information about the error",
"type": "string"
},
"name": {
"description": "Unique key for the error type",
"type": "string"
}
},
"required": [
"name",
"message"
],
"type": "object"
},
{
"properties": {
"name": {
"enum": [
"SecondFactorRequired"
],
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
]
}
Some of the specified values do not meet our requirements.
A wrong password or second factor and an unverified email address are answered with
ValidationError, identified by its message: WrongPassword, MfaCodeNotValid or
EmailAddressNotVerified.
Possible domain specific type values are:
- PasskeyVerificationFailed
- *
Content-Type: application/json
null
{
"anyOf": [
{
"type": "object",
"required": [
"type",
"validationErrors"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ValidationError"
]
},
"message": {
"type": "string",
"example": "Validation failed"
},
"validationErrors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"path",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "The standard error message",
"example": "should be string"
},
"path": {
"type": "string",
"description": "The path to the part of the data that was validated. JavaScript property access notation (e.g., \".prop[1].subProp\") is used.\n",
"example": ".address.street"
},
"type": {
"type": "string",
"description": "ajv validation error type (e.g. \"format\", \"required\", \"type\") or own validation error types",
"example": "format"
},
"context": {
"type": "object",
"example": {
"format": "email"
},
"description": "The object with the additional information about the error that can be used to create custom error messages. Keys depend on the\ntype that failed validation (e.g. \"missingProperty\" for type \"required\")\n",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
]
}
The user already has the maximum of 20 passkeys. Possible domain specific type values are:
- TooManyPasskeys
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Your request ran into a rate limit. You have to wait until rate limit expires
- messagestring
- typestring
Content-Type: application/json
{
"message": "too many requests",
"type": "RateLimitError"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "too many requests"
},
"type": {
"type": "string",
"example": "RateLimitError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Nutzungsbeispiele
$ curl \
--fail \
--location \
-X POST \
-d '{"multiFactorCode":"123456","passkeyCredential":{"challengeId":"6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11","credential":{"authenticatorAttachment":"platform","clientExtensionResults":{},"id":"AN29uP9UVfVZ1X0WLKg3zA","rawId":"AN29uP9UVfVZ1X0WLKg3zA","response":{"authenticatorData":"8q2Xwa9qKcqUca3Qox8O-H9rqwjlNp1O5WHPOETZnigdAAAAAA","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoicmNVYTE2MzRZVWFDc0JlYXNyb1RWdWRCYjRqTlNuS3pUR3pKOUVkTGxyQSIsIm9yaWdpbiI6Imh0dHBzOi8vc3R1ZGlvLm1pdHR3YWxkLmRlIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ","signature":"MEUCIQD7nQ352E7fNAwHcgq5mMDsoeHQ0odAgekdw9tbs-Lc1gIgSBt2yLdJV_AcNx76CMsEP-S7LoJ_E0q-y19EAEWtwLI","userHandle":"NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx"},"type":"public-key"}},"password":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/self/passkey-registration-challenges
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.user.createPasskeyRegistrationChallenge({
"data": {
"multiFactorCode": "123456",
"passkeyCredential": {
"challengeId": "6a1f0b1e-7d0c-4a43-9c1f-4f6c9b0f7a11",
"credential": {
"authenticatorAttachment": "platform",
"clientExtensionResults": {},
"id": "AN29uP9UVfVZ1X0WLKg3zA",
"rawId": "AN29uP9UVfVZ1X0WLKg3zA",
"response": {
"authenticatorData": "8q2Xwa9qKcqUca3Qox8O-H9rqwjlNp1O5WHPOETZnigdAAAAAA",
"clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoicmNVYTE2MzRZVWFDc0JlYXNyb1RWdWRCYjRqTlNuS3pUR3pKOUVkTGxyQSIsIm9yaWdpbiI6Imh0dHBzOi8vc3R1ZGlvLm1pdHR3YWxkLmRlIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ",
"signature": "MEUCIQD7nQ352E7fNAwHcgq5mMDsoeHQ0odAgekdw9tbs-Lc1gIgSBt2yLdJV_AcNx76CMsEP-S7LoJ_E0q-y19EAEWtwLI",
"userHandle": "NmMxYzFkMGUtNmYwZS00YTNjLTlkM2YtNWYyZDFkMGI5YTEx"
},
"type": "public-key"
}
},
"password": "string"
}
});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\User\CreatePasskeyRegistrationChallenge\CreatePasskeyRegistrationChallengeRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\CreatePasskeyRegistrationChallenge\CreatePasskeyRegistrationChallengeRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// CreatePasskeyRegistrationChallengeRequestBody to learn how to construct a valid instance
$body = new CreatePasskeyRegistrationChallengeRequestBody(/* TODO: ... */);
$request = (new CreatePasskeyRegistrationChallengeRequest(
body: $body
));
$response = $client->user()->createPasskeyRegistrationChallenge($request);
var_dump($response->getBody();