Authentication

API keys, how to send them and how to keep them safe.

Send your key

Every request under /v1 needs an API key, sent as a bearer token. After setting the quickstart environment variables, try:

curl -fsS "$TRIP_TOPOLOGY_URL/v1/places/FRA" \
  -H "Authorization: Bearer $TRIP_TOPOLOGY_KEY"

Keys start with ttk_. A key cannot be sent in the query string. The API does not answer cross-origin requests from browsers: call it from your server, so that the key stays there.

Manage keys

The console creates, lists and revokes keys. Keys belong to your account, not to the person who created them, and each works alone.

Errors

Status Code Meaning
401 unauthorized The request has no bearer token
401 invalid_api_key The key is malformed, unknown, expired or revoked
503 auth_unavailable Keys cannot be checked right now; honour Retry-After

A 401 carries a WWW-Authenticate: Bearer header. Retrying it unchanged does not help.