Technical documentation: all current API routes, permissions and examples are available at docs.fitsociety.io. Developers should start with the Public API quickstart.
Is a connection with the public API not working? The API then returns an HTTP status and an error key, for example 401 with auth.invalid_token. Below you read what they mean. Feel free to pass this article on to your developer.
Check this first
Is the API client still active? Go to Settings → Plugins and Integrations → Public API → OAuth clients. Is the client set to Revoked or Disabled? Then create a new client.
Was the secret rotated? After Rotate secret, the old secret and the active tokens stop working. Have your developer use the new secret.
Is the token still valid? An access token is valid for one hour. After that the connection must request a new token.
Does the client have the right scopes? Permissions of an existing client are not extended automatically. If you need more, create a new client.
What the status means
400: the request is not correct, for example an invalid ID or field. For a change, the Idempotency-Key is sometimes missing (idempotency.required). The developer adjusts the request.
401: there is no valid token. auth.missing_bearer: no token sent. auth.invalid_token: the token is expired, revoked or incorrect. auth.invalid_client: the API client no longer exists or is disabled.
403: the token is valid, but permissions are missing. scopes.insufficient: a scope is missing. scopes.health_consent_required or scopes.private_communication_consent_required: the client was created without consent for health data or private communication. auth.provider_unavailable: the public API is not available for your company; contact support.
404: the address or the item does not exist, or does not belong to your company.
409: there is a conflict. For example the same Idempotency-Key for a different request (idempotency.conflict), a request that is still running (idempotency.in_progress), or a member who already exists (CLIENT_ALREADY_EXISTS_IN_COMPANY).
429: too many requests (rate_limit.exceeded). Each API client may make 10 requests per second. Wait the number of seconds in Retry-After and then try again.
500: an unexpected error at FITsociety (server.internal_error). Try again later.
The public API does not return status 422. Input errors get status 400.
Errors when requesting a token
invalid_client (401): unknown client ID or wrong client secret.
unauthorized_client (403): the client is disabled or is not allowed to make this request.
invalid_scope (400): a requested scope does not exist or was not given to this client.
invalid_request or unsupported_grant_type (400): the token request is incomplete or uses a method other than client_credentials.
Still not working?
Send us a message via the chat with the HTTP status, the error key, the time and the request ID (meta.requestId). Never send your client secret or access token.
The full list of error keys is on docs.fitsociety.io. Also read: Setting up an API connection and managing permissions.