Skip to content
Docs menu

Copy the text

Your browser did not allow copying. The text below is selected: press Ctrl+C, or ⌘C on a Mac.

Get a challenge for App Attest

The first step of a session without an account. The challenge is valid for five minutes.

POSThttps://api.switchfile.io/v1/app/guest/challenge

No API key needed.

Example

curl "https://api.switchfile.io/v1/app/guest/challenge" \
  -d ""

Responses

  • 200OK
    • challengestringrequired

      Pass the SHA-256 of these bytes (UTF-8) as clientDataHash to App Attest

    • expires_instring (integer) | integerrequired

      Seconds the challenge stays valid

    200 application/json
    {
      "challenge": "1763116800.q8Jx2v3mQ0yS6nB1kR9tLw.Wm9vYmFyYmF6cXV4",
      "expires_in": 300
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded",
      "title": "Rate limit exceeded",
      "status": 429,
      "code": "RATE_LIMIT_EXCEEDED",
      "detail": "Too many requests. Try again in 12 seconds."
    }

Error bodies and codes are explained in Errors.