Documentation Index
Fetch the complete documentation index at: https://docs.yofacturo.es/llms.txt
Use this file to discover all available pages before exploring further.
Overview
YoFacturo uses a two-step authentication flow:- Exchange your organization’s
api_keyfor a short-livedsession_token. - Include the
session_tokenas a Bearer token in theAuthorizationheader of every subsequent request.
Step 1 — Get your API key
Log in to YoFacturo, navigate to Settings → API, and copy your organization’sapi_key. API keys follow the format org_live_<random>.
Step 2 — Create a session token
Exchange yourapi_key for a session_token valid for 24 hours.
Endpoint
Request
Your organization’s API key (e.g.
org_live_1234567890abcdef).Example
Response
| Field | Type | Description |
|---|---|---|
session_token | string | Bearer token to use in subsequent requests |
expires_at | ISO 8601 datetime | Expiry time of the token (24 hours from issuance) |
Error responses
| Status | Code | Cause |
|---|---|---|
400 | bad_request | api_key parameter is missing or empty |
401 | unauthorized | The provided api_key is invalid or has been revoked |
Step 3 — Authenticate requests
Include thesession_token in the Authorization header as a Bearer token for all protected endpoints:
401 Unauthorized:
Token expiry and renewal
Session tokens expire 24 hours after creation. There is no refresh mechanism — simply request a new token by callingPOST /api/v1/auth/sessions again with your api_key.
We recommend storing the expires_at timestamp and proactively renewing the token before it expires to avoid failed requests.
