Search Documentation

Search API endpoints, webhooks, tools, and guides

On this page3 sections
Guides

Authentication & Security

Guide to Bearer JWT sessions, scoped integration tokens, and OAuth2 client credentials.

InvogerPOS enforces cookie-less Bearer authentication and tenant-isolated PostgreSQL authorization on every protected API endpoint.

1. User Bearer JWT (Session Login)

For POS cashiers and back-office operators:

  • Call POST /api/auth/login with email (or username) and password.
  • The server verifies the user's approval status (approved, active, non-archived) and tenant role, returning accessToken and refreshToken.
  • Include Authorization: Bearer <accessToken> on all subsequent requests.
  • Refresh expired tokens via POST /api/auth/refresh-token.

2. Integration Tokens (inv_live_...)

For server-side scripts, local sync agents, and MCP clients:

  • Issue a scoped token from Integrations > Developer Tokens or via POST /api/integrations/create-token.
  • Tokens carry explicit permission scopes (default expiry: 90 days) and are rejected by user-only management endpoints (such as logout, profile edits, or token creation).
  • Send Authorization: Bearer inv_live_....

3. OAuth2 Client Credentials (M2M)

For enterprise server-to-server integrations:

  • Register an OAuth client via POST /api/integrations/create-oauth-client to receive client_id and client_secret.
  • Exchange credentials via POST /api/integrations/oauth2/token using JSON, application/x-www-form-urlencoded, or HTTP Basic Authentication.
json
{ "client_id": "inv_client_998123", "client_secret": "inv_secret_••••", "grant_type": "client_credentials", "scope": "invoice.create product.view" }
POST/api
curl -X POST "https://api.invoger.com/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{ "email": "owner@company.com", "password": "••••••••" }'
Interactive playground

Response

application/json
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIs...",
    "refreshToken": "v1.MRmO7x...",
    "expiresAt": 1795664910,
    "tokenType": "bearer"
  }
}