Create Challenge
Changed onMints the challenge and WebAuthn options a browser needs to run a ceremony against the authenticated user's own passkeys. A registration challenge enrolls a new passkey; a deletion challenge is bound to the one passkey named by passkey_id and proves the user still holds it. The options are in wire snake_case: convert the keys to camelCase before passing them to the browser. Challenges are single-use and expire 5 minutes after they are issued, so send a fresh Idempotency-Key per ceremony — a replayed key returns the original challenge, which may already have expired. Requires a user session. A registration challenge also requires step-up verification, so the user completes it before the browser ceremony.
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Headers
Pins the request to a dated API version.
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
The ceremony this challenge is for.
The passkey the ceremony targets, prefixed wcred_. Required when challenge_type is deletion, ignored otherwise.
Example request
{
"challenge_type": "deletion",
"passkey_id": "wcred_xxxxxxxxxxxxxx"
}Response
challenge minted
The challenge to pass to the WebAuthn ceremony, base64url-encoded without padding. Also inside the options.
Example response
{
"challenge": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"creation_options": {
"attestation": "none",
"authenticator_selection": {
"require_resident_key": true,
"resident_key": "required",
"user_verification": "required"
},
"challenge": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"exclude_credentials": [
{
"id": "bGFwdG9wLWNyZWRlbnRpYWw",
"transports": [
"ble"
],
"type": "public-key"
}
],
"extensions": {
"cred_props": true
},
"pub_key_cred_params": [
{
"alg": -257,
"type": "public-key"
}
],
"rp": {
"id": "localhost",
"name": "Whop"
},
"timeout": 300000,
"user": {
"display_name": "Marcus Webb",
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "marcus@shinetime.example"
}
},
"request_options": {
"allow_credentials": [
{
"id": "bGFwdG9wLWNyZWRlbnRpYWw",
"transports": [
"ble"
],
"type": "public-key"
}
],
"challenge": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"rp_id": "localhost",
"timeout": 300000,
"user_verification": "required"
}
}Changes
- info
added the required property
creation_optionsto the response with the status - info
added the required property
request_optionsto the response with the status
- info
- info
added the non-success response with the status
- info