Skip to main content
An SDK is a library that calls the TechnicallyFit API for you, so your code works with functions and typed values and does not build each request by hand. There are two SDKs, with the same features:

Install and make a first call

Install the package for your language:
Then ask the API which workspace your key belongs to. With TF_API_KEY set to a test key (see Quickstart), this runs as it is:
Both print the workspace name, its kind (personal or organization) and the key’s mode (test or live). baseUrl and base_url default to the production API; set TF_API_BASE only to call another host.

What the SDKs do

  • Typed calls. Every public operation, with its parameters, body and answer typed from the API reference. A path, field or value the API does not take fails when you build your code, not when you send it.
  • Retries. A request that hit a rate limit, a network failure or a temporary server error is sent again, after the Retry-After wait the API asked for. Retries send the same idempotency keys, so nothing is stored twice.
  • Typed errors. Each error code has its own error class, with the code, the message, the request ID and the details.
  • Observation builders. Pain and soreness reports, logged sets and readings are checked against observation/1 and the quantity list before anything is sent. See Observation builders.
  • Offline batching. A queue that keeps events while your code cannot reach the API and sends each one once when it can. See Offline batching.
  • Teammate sign-in. The sign-in flow for member apps, and a credential that refreshes itself.
  • Webhook verification. Checks the signature of every delivery. See Webhook verification.

Authentication

The SDKs take a credential and send it the way the API expects:
An organization key reads and writes every teammate of your organization. Keep it on your servers. Never put one in a mobile app, a browser or any code that ships to a person’s device: sign the person in and use a teammate token instead.
The SDKs never follow a redirect, and never send a credential to a host other than the one you configured.

TypeScript

Install, authenticate and make your first call.

Python

Install, authenticate and make your first call.