POST /auth/fido

Register a FIDO device for WebAuthn authentication. It requires registration response from the device.

application/json

Body Required

  • registration_response object Required

    FIDO device registration response

  • device_name string Required

    Name for the FIDO device

Responses

  • 200

    FIDO device registered

  • 400

    Registration failed or no preregistration

POST /auth/fido
curl -X POST "http://api.example.com/auth/fido" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "registration_response": {},
  "device_name": ""
}'
import requests

url = "http://api.example.com/auth/fido"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "registration_response": {},
    "device_name": ""
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/auth/fido' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"registration_response":{},"device_name":"string"}'
Request examples
{
  "registration_response": {},
  "device_name": "string"
}