Every endpoint except login requires a Bearer token in the Authorization header.
Use POST /v1/auth/login with your Franklin credentials in the body. The account must have API access enabled for your organization.
curl -X POST "https://api.genoox.com/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your_password"}'{
"token": "eyJhbGciOiJIUzI1NiIs...",
"duration": 86400,
"expires_at": 1704153600
}| Field | Meaning |
|---|---|
token | Send as Authorization: Bearer <token> |
duration | Validity in seconds, typically 86400 (24 hours) |
expires_at | Unix timestamp, in seconds, when the token stops working |
A GET variant also exists, taking the email as a query parameter and the password in the Authorization header. Prefer POST for new integrations: it keeps the email out of URLs and access logs.
curl "https://api.genoox.com/v1/analysis?analysis_id=12345" \
-H "Authorization: Bearer $FRANKLIN_TOKEN"Tokens expire; there is no refresh endpoint. Log in again shortly before expires_at, and once more if a call returns 401.
import time
import requests
BASE = "https://api.genoox.com"
class FranklinClient:
def __init__(self, email, password):
self.email, self.password = email, password
self.token, self.expires_at = None, 0
def _login(self):
r = requests.post(f"{BASE}/v1/auth/login",
json={"email": self.email, "password": self.password})
r.raise_for_status()
body = r.json()
self.token, self.expires_at = body["token"], body["expires_at"]
def request(self, method, path, **kwargs):
if time.time() > self.expires_at - 300: # renew 5 minutes early
self._login()
headers = {"Authorization": f"Bearer {self.token}"}
r = requests.request(method, f"{BASE}{path}", headers=headers, **kwargs)
if r.status_code == 401: # revoked or expired early
self._login()
headers["Authorization"] = f"Bearer {self.token}"
r = requests.request(method, f"{BASE}{path}", headers=headers, **kwargs)
return rThe recipes use this FranklinClient as client.
| Status | message | What to do |
|---|---|---|
401 | login failed, check email and password | Check the credentials |
401 | user you@example.com is not allowed to use api | Ask your Franklin representative to enable API access for this user |
429 | rate limit exceeded | Back off. Repeated failed logins can temporarily block the account |
- Use a dedicated integration user rather than a person's account, so rotating the password or offboarding someone never breaks the integration.
- Keep credentials in a secret store, never in source code.
- Reuse one token for its lifetime instead of logging in before every call.