Skip to main content

Documentation Index

Fetch the complete documentation index at: https://webscraping.titannet.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Titan supports two primary access patterns:
  • JWT-based access for signed-in users and frontend applications
  • API key access for backend systems and automation
Both are supplied as bearer tokens, but they are created and managed differently. Examples below use AUTH_URL, JWT_TOKEN, and TITAN_TOKEN where relevant. Tab labels match other integration pages so your language choice stays in sync.

When to use each token type

Token typeBest forTypical caller
JWTInteractive sessions and browser-based appsDashboard, frontend clients
API keyStable server-to-server automationBackend jobs, internal services, CI workflows

Before you begin

RequirementWhy it matters
Auth service URLTo sign in, fetch sessions, and manage API keys
A Titan user accountTo obtain a JWT and create user API keys
Required scopesTo call the Task Service and related APIs successfully
export AUTH_URL="https://api.webscraping.titannet.io"
export TASK_SERVICE_URL="https://api.webscraping.titannet.io"

How authentication fits into the platform

Use a JWT

JWTs are best when a user is signed in through the dashboard or when a frontend needs to call Titan APIs on behalf of a user.

Step 1: sign in

curl -sS -X POST "$AUTH_URL/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@example.com", "password": "your-password" }'

Step 2: retrieve the active session

curl -sS "$AUTH_URL/api/v1/auth/session" \
  -H "Authorization: Bearer $JWT_TOKEN"
Use the returned token as your bearer token in Task Service requests.

Create an API key

API keys are the recommended choice for backend integrations.

Step 1: obtain a JWT

You create API keys as an authenticated user, so start with a JWT.

Step 2: create a scoped key

curl -sS -X POST "$AUTH_URL/api/v1/api-keys" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My backend integration",
    "scopes": ["tasks:read", "tasks:write", "executions:read", "executions:write", "data:read"]
  }'
Example response:
{
  "id": "key-uuid",
  "name": "My backend integration",
  "key": "titan_sk_live_abc123...",
  "scopes": ["tasks:read", "tasks:write", "executions:read", "executions:write", "data:read"],
  "created_at": "2025-01-01T00:00:00Z"
}
Store the key value securely. It is the secret your automation will use.

Common scopes

ScopeUse it when you need to…
tasks:readList or inspect tasks
tasks:writeCreate, update, delete, or run tasks
executions:readInspect execution state and history
executions:writeTrigger and control executions
data:readExport results, datasets, or media
analytics:readRead usage or execution analytics
billing:readBrowse billing and wallet information
billing:writeChange plan selection and other billing mutations (when exposed by your deployment)

Use the token in API requests

All user-facing examples in this documentation use a bearer header on Task Service calls:
curl -H "Authorization: Bearer $TITAN_TOKEN" "$TASK_SERVICE_URL/api/v1/tasks"
That token may be either:
  • A JWT
  • An API key

Best practices

PracticeWhy it matters
Use API keys for backend automationThey are more stable than user sessions
Use the minimum scope setLimits blast radius if a key is exposed
Keep JWTs in frontend session flows onlyAvoids mixing browser auth with backend automation
Rotate keys deliberatelyKeeps long-lived integrations safer

Troubleshooting

ProblemWhat to check first
401 UnauthorizedMissing bearer token or invalid token
403 ForbiddenToken is valid but missing required scopes
API key creation failsEnsure you are calling auth with a valid JWT
Dashboard works but backend calls failYou may be using a session flow where an API key is needed

Next steps