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.
Create a session token
Exchange yourapi_key for a session_token valid for 24 hours.
Endpoint
Request
string
required
Your organization’s API key.
Example
Response
This endpoint returns a flat JSON object — nodata envelope.
Error responses
Authenticate requests
Include thesession_token in the Authorization header as a Bearer token for all protected endpoints:
Authorization header is missing, the API returns 401 Unauthorized:
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.
