Users

Create Challenge

Changed on

Mints 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.

post/users/me/passkeys/challenge

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Idempotency-Key, string
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

object required
challenge_type, 'registration' | 'deletion' required

The ceremony this challenge is for.

passkey_id, string

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

PasskeyChallenge required
challenge, string required

The challenge to pass to the WebAuthn ceremony, base64url-encoded without padding. Also inside the options.

creation_options, PasskeyCreationOptions nullable required
request_options, PasskeyRequestOptions nullable required

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_options to the response with the status

    • info

      added the required property request_options to the response with the status

    • info

      added the non-success response with the status