Skip to main content
Different API endpoints use different authentication methods depending on the caller.

SDK / Mobile app

The iOS SDK identifies your app with Bundle ID + Team ID headers:
These headers are sent automatically by the SDK — but they only identify the tenant, they are not authentication. Bundle IDs and Team IDs are discoverable from the App Store, so they are not secrets. Attestation endpoints (/challenge, /validate, /refresh) need only these headers — the attestation object itself is the proof. All other SDK endpoints — feature flags, the flag SSE stream, heartbeat, feedback, and support — additionally require one of:
  • A Grantiva JWT issued by attestation, sent as Authorization: Bearer <jwt> (this is what the SDK does automatically after validateAttestation()), or
  • An API key (simulator/development mode, or server-side callers).
Requests with only the identity headers receive 401 Unauthorized with WWW-Authenticate: Bearer realm="grantiva".
In practice the SDK handles this for you: run validateAttestation() once before using flags, feedback, or support. In the iOS Simulator (no App Attest), initialize the SDK with an API key instead — see Simulator Setup.

Server-to-server

For backend integrations (analytics, VRT CLI), use an API key:
API keys are created in the dashboard under Settings.

JWT token

After successful attestation, the SDK receives a JWT token. Protected endpoints require this token:

Admin API

For internal admin operations:

Summary