Get authentication options

Get authentication options for WebAuthn (passwordless authentication)

  • HTTP Method: GET
  • URL: https://example.domain.tld/api/v1/webauthn/authentication/options/
  • Require authentication: No

Response parameters

See example response below. These options can be passed to browser’s navigator.credentials.get() method or to a library like SimpleWebAuthn. For details of WebAuthn, see its W3C specification or MDN docs.

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/webauthn/authentication/options/"
r = requests.get(url)
try:
    pprint(r.json())
except:
    print(r.text)

Example response (JSON)

{
    "allowCredentials":[],
    "challenge":"3JMxkXdTod6UoaFJR5-Gp7ReiPdj_Mn9IlZWuJW2uJg0ScM5rITUq3CoIc_S4u5JuBA6QYYXdTqe9YTz3KUgsg",
    "rpId":"demo.mymailcheap.com",
    "timeout":60000,
    "userVerification":"preferred"
}