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 this | Where | If you skip it |
|---|---|---|---|
| 1 | Sign up and verify your email. Your organisation and its test mode exist at once | timbereye.com, self-serve | Nothing to configure |
| 2 | Choose the app's credential: a publishable key in the app, or capture tokens your server mints per worker | Console › Keys (Keys) | 401 authentication_required |
| 3 | Publishable key only: put your app's bundle id (iOS) and package name (Android) in allowed_app_ids | Console › Keys, or PATCH /api_keys/{id} | Any app holding the key may use it; a wrong id: 403 app_not_allowed |
| 4 | Have your server create each group with its secret key and give the app the id, or let the app open groups by your record id | Create groups | The scanner has nothing to scan into |
| 5 | In the app: NSCameraUsageDescription in Info.plist, and detector: .download in configure (Android: Detector.Download) | Your app | No camera; the measuring modes stay off |
| 6 | Scan in test mode until your group.measured handler stores what you need | Test keys (te_test_…) | |
| 7 | Go live: an owner accepts the Terms and adds a card | Console › Billing (Going live) | Live keys and tokens get 403 live_mode_not_enabled |
| 8 | Ship the live credential: a live publishable key with the same allowed_app_ids, or capture tokens minted with the live secret key; live groups | Console in live mode | A test key in the app writes to test mode |
Configured with a publishable key:
Timbereye.configure(publishableKey: "te_live_pk_…", detector: .download)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):
Timbereye.configure(tokenProvider: { try await myServer.captureToken() }, detector: .download)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:
| Error | Means | Fix |
|---|---|---|
403 live_mode_not_enabled | A live credential before live mode is on | Step 7 |
403 app_not_allowed | The bundle id is not in the key's allowed_app_ids | Step 3 |
400 installation_id_required | A request without the installation header (not from the SDK) | Use the SDK |
503 model_unavailable | Timbereye'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 answers503 model_unavailable,Timbereye.detectoris.notPublished, and only the counting modes work. Timbereye puts it there; there is nothing to request. If you seemodel_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.