Skip to the page
Docs menu

Docs Platform

Set up your organisation for the SDK

What an organisation does before the Timbereye scanner runs in its own iOS or Android app: the key, the app id, live mode, the log detector, and the one step that still needs Timbereye.

Before step 2: Scan. For the team shipping the scanner in its own app. Do these once per organisation; your app code does not change between test and live.

Every step is yours, in the console, except the last section. In order:

#Do thisWhereIf you skip it
1Sign up and verify your email. Your organisation and its test mode exist at oncetimbereye.com, self-serveNothing to configure
2Choose the app's credential: a publishable key in the app, or capture tokens your server mints per workerConsole › Keys (Keys)401 authentication_required
3Publishable key only: put your app's bundle id (iOS) and package name (Android) in allowed_app_idsConsole › Keys, or PATCH /api_keys/{id}Any app holding the key may use it; a wrong id: 403 app_not_allowed
4Have your server create each group with its secret key and give the app the id, or let the app open groups by your record idCreate groupsThe scanner has nothing to scan into
5In the app: NSCameraUsageDescription in Info.plist, and detector: .download in configure (Android: Detector.Download)Your appNo camera; the measuring modes stay off
6Scan in test mode until your group.measured handler stores what you needTest keys (te_test_…)
7Go live: an owner accepts the Terms and adds a cardConsole › Billing (Going live)Live keys and tokens get 403 live_mode_not_enabled
8Ship the live credential: a live publishable key with the same allowed_app_ids, or capture tokens minted with the live secret key; live groupsConsole in live modeA test key in the app writes to test mode

Configured with a publishable key:

Swift
Timbereye.configure(publishableKey: "te_live_pk_…", detector: .download)
Kotlin
Timbereye.configure(this, publishableKey = "te_live_pk_…", detector = Detector.Download { file, model -> TfliteLogDetector.open(file, model) })

Or with capture tokens from your server (the stricter setup):

Swift
Timbereye.configure(tokenProvider: { try await myServer.captureToken() }, detector: .download)
Kotlin
Timbereye.configure(this, tokenProvider = { myServer.captureToken() }, detector = Detector.Download { file, model -> TfliteLogDetector.open(file, model) })

On Android the detector's runtime is its own artifact, com.timbereye:timbereye-detector-tflite, so an app that only counts does not ship it; this is your Application.

allowed_app_ids applies to publishable keys only: a capture token is already limited to its groups and its hours, and is not checked against an app id. The SDK sends your bundle id as Timbereye-App-Id and a per-install UUID as Timbereye-Installation-Id by itself.

Check it from the app#

GET /account with the app's credential says what it may do (key.kind, group_access, what is left of today's limits) without touching your data; Timbereye.availability(of: .qrScale) says whether a mode can run on this phone now, and why not. The errors that mean setup is missing:

ErrorMeansFix
403 live_mode_not_enabledA live credential before live mode is onStep 7
403 app_not_allowedThe bundle id is not in the key's allowed_app_idsStep 3
400 installation_id_requiredA request without the installation header (not from the SDK)Use the SDK
503 model_unavailableTimbereye's environment has no log detector to offer (below)Nothing on your side

What still needs Timbereye#

  • The log detector must be on Timbereye's servers. The measuring modes (Scale with QR tag, AR scale) need it; the SDK downloads it once from GET /models/detector. Where the file is not yet in an environment's storage, that call answers 503 model_unavailable, Timbereye.detector is .notPublished, and only the counting modes work. Timbereye puts it there; there is nothing to request. If you see model_unavailable, tell support.
  • A contract instead of a card. Above 100,000 m³ a year, to resell, or to pay by invoice, Timbereye staff set your organisation's plan; write to support. Card billing needs no one.
  • The SDK packages. Until the Swift package and the Maven artifact are published, the SDKs are built from source, which Timbereye shares with you. See What is available.

Nothing else waits on Timbereye: keys, app ids, live mode, groups and webhooks are self-serve.