Skip to main content
The Public API uses OAuth client credentials for server-to-server access. This matches the Jortt-style pattern: use client_id and client_secret at the token endpoint, then call API resources with a Bearer token.
Public API resource calls do not accept x-api-key. The x-api-key header is not part of the new Public API auth model.
/public/v1/access/* uses a separate device-key contract for gates and scanners. It does not use OAuth scopes or fspt_... Bearer tokens. See the Access Devices section for x-device-key authentication.

1. Create an OAuth client

A coach creates a Public API OAuth client from the authenticated FITsociety app API:
The response includes clientSecret once. Store it securely. FITsociety stores only a hash of the secret.

2. Request an access token

Exchange the client credentials for an access token:
Response:
If scope is omitted, FITsociety issues all scopes assigned to the client. Requested scopes must be a subset of the client’s assigned scopes.

Available scopes

3. Call a resource

Use the access token in the Authorization header:
Example:
Write requests require a stable Idempotency-Key header. Reuse the same key only when retrying the exact same request.

Token lifetime

Rotating a client secret revokes existing access tokens for that client.