API keys
Create, roll and revoke keys. Dashboard sessions only.
The api key object#
An API key as the dashboard shows it. Only the creating or rolling response carries the secret; POST /api_keys/{id}/reveal shows a key again.
| Field | Description |
|---|---|
idstring | Key id, prefixed key_. It is also the middle part of the key itself. |
objectapi_key | String representing the object type. Always api_key. |
livemodeboolean | false for a te_test_ key. |
kindsecret \| restricted \| capture \| publishable | secret has full access, restricted the listed scopes, capture is a short-lived device token, publishable is safe to embed in a mobile app and can only capture. |
namestring, nullable | The label you gave it. |
scopesarray of string | Scopes the key holds (every scope for a secret key). |
redacted_keystring | The key's prefix and id with the secret left out, for display: te_test_sk_<keyid>_…. |
last4string, nullable | The key's last four characters, for a masked display (te_test_sk_••••abcd). null for keys created before it was recorded. |
revealableboolean | Whether POST /api_keys/{id}/reveal can show the full key: true for a secret, restricted or publishable key created since keys are stored for showing again. false for older keys, which keep working (roll one to get a revealable successor). |
is_defaultboolean | The organisation's default key of this kind and mode, made for it automatically: the key the console shows on Home. A roll passes it to the new key; when it is revoked, a new default is made unless another key that can be shown remains. |
publishable_keystring, nullable | Publishable keys only, which are not secrets. The full key, in the list, to owners and developers; null for other kinds, for other roles and for publishable keys created before keys were stored. |
secretstring, nullable | The full key. Present in the response that creates or rolls it; null everywhere else, including a replay. A key whose revealable is true can be shown again with POST /api_keys/{id}/reveal. |
created_atstring | Creation time. |
expires_atstring, nullable | When the key stops working: set on a capture token, and on a key that was rolled with a grace period. null otherwise. |
revoked_atstring, nullable | When the key was revoked, or replaced by a roll without grace. null while it works. |
last_used_atstring, nullable | The start of the hour in which the key last authenticated a request. null if it never has. |
rolled_fromstring, nullable | The id of the key this one replaced. |
allowed_app_idsarray of string, nullable | Publishable keys only. The app identifiers (iOS bundle identifiers, Android package names) the key is restricted to, or null for none. Always null for other kinds. |
limitsPublishableKeyLimits, nullable | Publishable keys only. The key's effective limits (its own values over the defaults). Always null for other kinds. |
limits.requests_per_secondinteger | Requests per second. Default 10. |
limits.scans_per_dayinteger | Scans (sittings) a day. Default 2,000; 0 turns scanning off. |
limits.items_per_dayinteger | Scanned items and qr_count observations. |
limits.image_bytes_per_dayinteger | Bytes declared (content_length) or uploaded (multipart). |
limits.groups_opened_per_dayinteger | Groups opened by reference a day. Default 500; 0 turns opening off. |
group_accessany \| opened_only \| null, nullable | Publishable keys only: any (default) captures into any group whose id the app presents, plus groups opened by reference; opened_only only into groups the key opened by reference. null for other kinds. Whether the key may change a group's spec shows in scopes (groups:write). |
Also in this resource, for the Timbereye console only (a dashboard session, not an API key): List API keys, Create an API key, Roll an API key, Show a key again, Rename a key or change a publishable key, Revoke an API key, Remove what a publishable key captured.