API 參考
Passkeys
Customer API: GET /passkeys, POST /passkeys/register/options, POST /passkeys/register, …
Response 200
passkeysobject[]requiredpasskeys[].idstringrequiredpasskeys[].namestringrequiredpasskeys[].backedUpbooleanrequiredpasskeys[].createdAtstringrequiredpasskeys[].lastUsedAtstring | nullrequiredpasskeys[].stalebooleanrequiredBound to a previous primary domain; no longer usable on this site.
curl -X GET "https://{site}/api/v1/customer/passkeys" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN"Request body
originstringOrigin the WebAuthn ceremony runs on. Only `localhost` origins are honoured; production always uses the site's primary domain.
Response 200
optionsobjectrequired`PublicKeyCredentialCreationOptionsJSON` for `navigator.credentials.create()`.
Errors
METHOD_DISABLED422LIMIT_REACHED403RATE_LIMITED429
curl -X POST "https://{site}/api/v1/customer/passkeys/register/options" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Request body
responseobjectrequired`RegistrationResponseJSON` from the browser.
namestringLabel shown to the customer; defaults to the device and browser.
Response 200
passkeyobjectrequiredpasskey.idstringrequiredpasskey.namestringrequiredpasskey.backedUpbooleanrequiredpasskey.createdAtstringrequiredpasskey.lastUsedAtstring | nullrequiredpasskey.stalebooleanrequiredBound to a previous primary domain; no longer usable on this site.
Errors
VERIFY_FAILED422CHALLENGE_EXPIRED422ALREADY_REGISTERED422LIMIT_REACHED403
curl -X POST "https://{site}/api/v1/customer/passkeys/register" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Parameters
idstring · pathrequired
Errors
NOT_FOUND404
curl -X DELETE "https://{site}/api/v1/customer/passkeys/{id}" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN"