Read and update per-device fraud state bits using Apple DeviceCheck API

domain: developer.apple.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In the iOS app, call DCDevice.current.generateToken(completionHandler:) to obtain a device token; Base64-encode it for transmission
  2. On your server, generate a signed JWT using your Apple Developer private key (key ID and team ID in the header, issued-at in the payload)
  3. POST to https://api.devicecheck.apple.com/v1/query_two_bits with JSON body containing device_token (Base64), transaction_id (UUID string), and timestamp (Unix milliseconds); include the JWT as the Authorization: Bearer header
  4. Inspect the bit0 and bit1 boolean values in the 200 response to determine prior fraud state for this device
  5. To flag a device, POST to https://api.devicecheck.apple.com/v1/update_two_bits with the same structure plus bit0 and bit1 set to the desired values
  6. Use the development endpoint (api.development.devicecheck.apple.com) for sandbox testing; use the production endpoint for live apps

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans