API keys
Create a personal API key and choose what it can access.
BetaA personal API key lets a script or tool use your library without your sign-in.
Use a key
Create a key in the Trova app under Settings → API keys. The key is shown once, so copy it then. Keep it in an environment variable, not in your code:
export TROVA_API_KEY="ga_…"Send the key as a bearer token in the Authorization header of every request. This call lists your lists, so the key needs read on lists:
curl https://api.usetrova.app/v1/lists \
-H "Authorization: Bearer $TROVA_API_KEY"A missing, wrong, revoked or expired key gets a 401. A key without the access the route needs gets a 403.
Access levels
A key has either full access, or a level per resource: none, read or write.
Resources: items, spaces, lists, assets, search, chat, imports, cleanup, serendipity, rules, webhooks and account.
A route needs read on its resource for GET and write for any other method. Chat is the exception: POST /v1/chat only needs read. A key without the access it needs gets a 403.
Keys can't manage themselves
Creating keys, push devices and realtime sign-in need a signed-in session. An
API key gets a 403 on those routes.
Keep keys safe
Give each tool its own key with the least access it needs, so you can revoke one without breaking the rest. Never put a key in code that runs in a browser or ships in an app.
Last updated