tt_test_ — that give you full API access without touching your real study data. Use sandbox keys during development and integration testing. When you’re ready to ship, swap the prefix and your code works against live data with no other changes required.
Test vs live keys
The only difference between sandbox and production is which dataset your requests read and write. The API surface, request shapes, and error codes are identical across both environments.| Key prefix | Data affected | Use for |
|---|---|---|
tt_live_ | Your real study data | Production integrations |
tt_test_ | Isolated sandbox | Development and testing |
Test and live keys are generated separately. A
tt_test_ key can never accidentally write to your live data — the environments are fully isolated.Generate a test key
Generate an API key
Tap Generate API Key. In the key creation dialog, select the Sandbox (tt_test_) option before confirming.
Using test keys
Swap the key prefix to switch environments. Every endpoint, request body, and response shape is identical — only the data changes.The API base URL (
https://api.taketime.app/v1) is the same for both environments. The key prefix is the only routing signal — no separate subdomain or endpoint path is needed.Sandbox limitations
The sandbox behaves like production in almost every way, but there are a few intentional differences:- Data is isolated. Blocks, activities, subjects, and stats created with a test key exist only in your sandbox. They never appear in the live app or affect your streak and heatmap.
- Rate limits apply. The same request-per-minute and request-per-day limits from your plan tier are enforced in sandbox mode. Build rate-limit handling early so it works correctly in production.
- Push notifications do not fire. Sandbox blocks do not trigger push alerts, even if notifications are enabled in the app. This prevents test runs from generating noise on your devices.
Switching between environments
Use an environment variable to control which key your code uses. This pattern makes it trivial to switch environments without changing source code, and it keeps secrets out of version control.Terminal
Node.js
Go-live checklist
Before you deploy your integration to production, work through this checklist:- Replace the
tt_test_key with yourtt_live_key in your production secrets store - Store the live key in a secrets manager — not in source code or
.envfiles committed to version control - Confirm the API key is never exposed in client-side JavaScript or public API responses
- Review the rate limits for your plan tier and verify your integration stays within them under peak load
- Test all error-handling paths using intentionally bad requests (invalid IDs, missing fields) to confirm your error handling works end-to-end
- Set up key rotation: schedule a reminder to regenerate your live key periodically and update it in your secrets store