Skip to content

Authentication

The Tachapps API uses Bearer token authentication. Every request must include a valid API token in the Authorization header.

Obtaining a Token

Tokens are generated from the Tachapps UI:

  1. Navigate to Settings → API Tokens
  2. Click Generate New Token
  3. Give the token a descriptive name (e.g., ci-pipeline, python-notebook)
  4. Set an optional expiration date
  5. Click Generate
  6. Copy the token immediately — it will not be shown again

CAUTION

Treat API tokens like passwords. Never commit them to source control. Use environment variables or a secrets manager.

Using a Token

Include the token in the Authorization header of every request:

http
GET /api/v1/projects HTTP/1.1
Authorization: Bearer tach_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Example — cURL

bash
curl https://your-org.tachyus.com/api/v1/projects \
  -H "Authorization: Bearer $TACHAPPS_API_TOKEN"

Example — Python

python
import httpx

token = os.environ["TACHAPPS_API_TOKEN"]
base_url = "https://your-org.tachyus.com/api/v1"

client = httpx.Client(
    base_url=base_url,
    headers={"Authorization": f"Bearer {token}"}
)

projects = client.get("/projects").json()

Example — JavaScript

js
const token = process.env.TACHAPPS_API_TOKEN;

const response = await fetch('https://your-org.tachyus.com/api/v1/projects', {
  headers: { Authorization: `Bearer ${token}` }
});

const projects = await response.json();

Token Scopes

Tokens can be scoped to limit access:

ScopeDescription
read:projectsList and read projects
read:wellsList and read wells
read:productionRead production data
write:projectsCreate and update projects
write:wellsCreate and update wells
adminFull access

When generating a token, select only the scopes required for your use case.

Token Expiration & Rotation

  • Tokens with an expiration date automatically become invalid after the set date
  • Rotate tokens regularly for long-running integrations
  • Revoke a token at any time from Settings → API Tokens → Revoke

Error Responses

HTTP StatusCodeMeaning
401 UnauthorizedUNAUTHORIZEDToken is missing or invalid
403 ForbiddenFORBIDDENToken lacks required scope
429 Too Many RequestsRATE_LIMITEDRate limit exceeded

Next Steps

Built with VitePress · Powered by Tachyus