Skip to content

Auto Login

Automatically authenticate users in the platform from external systems without manual credential entry.

Overview

The Auto Login feature allows external systems to automatically authenticate a user on the platform without requiring manual credential input. Through this integration, an authorized system can request the API to generate an automatic access URL for a specific user. Once obtained, the external system simply redirects the user's browser to that URL for immediate platform access.

Available modes

Two Auto Login modes are available. Both produce URLs with the same format (https://app.fliinow.com/autologin?token=...) and share the same processing view; they differ in lifecycle and how the partner uses them.

Ephemeral (on-demand SSO)

Recommended

Designed for on-demand SSO: a fresh URL is generated for each user redirect and lives 120 seconds. Ideal when the partner can call the API right before redirecting.

Static (embedded URL)

Designed to embed a stable URL inside a CRM, intranet or partner portal. The URL is generated once and can be reused for months, until it is revoked or expires.

Side-by-side comparison

AspectEphemeralStatic
ReusableNo (single use)Yes, until revoked/expired
LifetimeFixed 120 secondsNo expiration or configurable expiresAt
RevocationN/A (auto-expires)Explicit, from the group panel
Concurrent tokensUnlimitedOnly 1 active per (group, targetUsername)

1) Generate ephemeral Auto Login URL

To use the ephemeral mode, the external system must call the endpoint that generates the automatic access link. This requires a group API key: merchant and integrator keys get 403.

HeaderValue
X-API-Key${MANAGEMENT_GROUP_API_KEY}
Content-Typeapplication/json

Request

POST /api/auth/autologin/token
POST https://app.fliinow.com/api/auth/autologin/token

Headers:
  X-API-Key: ${MANAGEMENT_GROUP_API_KEY}
  Content-Type: application/json

Body:
{
  "targetUsername": "usuario@ejemplo.com"
}

Response

200 OK
{
  "targetUsername": "usuario@ejemplo.com",
  "expiresInSeconds": 120,
  "autologinUrl": "https://app.fliinow.com/autologin?token=puGt8PsUsA_SblL6m_jvg4zi-rHt0D_I12PB44gxgCo"
}

2) Generate static Auto Login URL

To generate a persistent URL that can be reused, the external system calls the dedicated endpoint. The returned URL can be embedded in the partner's internal systems and remains active until it is revoked or expires.

Request body

FieldTypeDescription
targetUsernamestringEmail of the target user. Required.
labelstring (optional)Optional label to identify the token in the audit panel (for example, the CRM or operator name). Availability depends on the API Key configuration.
expiresAtstring · ISO-8601 UTC (optional)Expiration date in ISO-8601 UTC format (e.g., 2026-12-31T23:59:59Z). Optional. If omitted or null, the token never expires until manually revoked.

Response

FieldDescription
targetUsernameEmail of the user associated with the URL.
autologinUrlReady-to-use Auto Login URL. Same format as the ephemeral one. Returned only on creation; once received, it cannot be retrieved again from the API.
expiresAtConfigured expiration date (or null if it never expires).

The expiresInSeconds field returned by the ephemeral endpoint does not apply here: lifetime is governed by expiresAt or is open-ended.

Request

POST /api/auth/autologin/persistent/token
POST https://app.fliinow.com/api/auth/autologin/persistent/token

Headers:
  X-API-Key: ${MANAGEMENT_GROUP_API_KEY}
  Content-Type: application/json

Body:
{
  "targetUsername": "usuario@ejemplo.com",
  "label": "CRM - Equipo Ventas",
  "expiresAt": "2026-12-31T23:59:59Z"
}

Response

200 OK
{
  "targetUsername": "usuario@ejemplo.com",
  "autologinUrl": "https://app.fliinow.com/autologin?token=puGt8PsUsA_SblL6m_jvg4zi-rHt0D_I12PB44gxgCo",
  "expiresAt": "2026-12-31T23:59:59Z"
}

Example: generate a static URL

cURL
curl -X POST https://app.fliinow.com/api/auth/autologin/persistent/token \
  -H "X-API-Key: ${MANAGEMENT_GROUP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "targetUsername": "usuario@ejemplo.com",
    "label": "CRM - Equipo Ventas",
    "expiresAt": "2026-12-31T23:59:59Z"
  }'
JavaScript
async function createPersistentAutologinUrl(targetUsername, label, expiresAt) {
  const response = await fetch(
    "https://app.fliinow.com/api/auth/autologin/persistent/token",
    {
      method: "POST",
      headers: {
        "X-API-Key": "${MANAGEMENT_GROUP_API_KEY}",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ targetUsername, label, expiresAt })
    }
  );

  if (!response.ok) {
    throw new Error("Error creating persistent autologin URL");
  }

  const data = await response.json();
  // IMPORTANT: store data.autologinUrl securely now.
  // It cannot be retrieved again from the API.
  return data;
}

Revoking static URLs

Persistent URLs cannot be revoked through the API. Revocation is performed exclusively from the group panel and takes effect immediately: from that moment on, any attempt to redeem the URL will fail. To invalidate a URL, open the panel and revoke it.

Audit from the panel

For each active persistent token, the group panel shows: useCount (number of redemptions), lastUsedAt, label, createdAt and expiresAt. This information makes troubleshooting easier and lets you monitor the actual usage of every embedded URL.

Response Codes

CodeDescription
200The auto login token has been generated successfully.
400Invalid request. May be due to a missing X-API-Key header, a malformed email, or an invalid body.
400The target user does not belong to the same group as the requester (applies to both endpoints).
400Persistent endpoint only: an active static token already exists for that targetUsername. Revoke it from the panel before generating a new one.
401Unauthorized. The API Key is invalid, does not exist, has expired, or has been revoked. May also occur if the key does not have the AUTOLOGIN feature enabled.
401The target merchant has been deleted (soft-deleted): the token is not redeemed even if it is still valid.
403The API key does not belong to a group. Only a group can generate Auto Login URLs (on both endpoints); merchant and integrator keys cannot.
500Internal server error during token generation or storage.

3) User Redirect

Once you have an autologinUrl (ephemeral or static), the external system must redirect the user's browser to that URL. This will allow the user to access the application directly without entering credentials.

Ephemeral redirect example
async function autologin(targetUsername) {
  const response = await fetch(
    "https://app.fliinow.com/api/auth/autologin/token",
    {
      method: "POST",
      headers: {
        "X-API-Key": "${MANAGEMENT_GROUP_API_KEY}",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ targetUsername })
    }
  );

  if (!response.ok) {
    alert("Error generating autologin token");
    return;
  }

  const data = await response.json();
  window.location.href = data.autologinUrl;
}
HTML form example
<!-- HTML Form -->
<form id="autologinForm">
  <label for="username">Usuario</label>
  <input type="email" id="username" required />
  <button type="submit">Acceder</button>
</form>

<script>
document.getElementById("autologinForm")
  .addEventListener("submit", function(event) {
    event.preventDefault();
    const username = document.getElementById("username").value;
    autologin(username);
  });
</script>

Auto Login View

The Auto Login view is the page responsible for processing the URL generated by either endpoint. The user experience is identical for ephemeral and static URLs: the view does not distinguish between the two modes.

  1. Extract the token included in the autologin URL.
  2. Validate the token, checking its validity and expiration.
  3. Redirect the user to the corresponding page based on the validation result.

AToken not present

If the URL does not contain a valid autologin token, the system attempts to extract the token. When not found, the user is redirected to the login page.

  1. The system attempts to extract the token from the URL.
  2. Token not found — the user is redirected to the login page.
Redirect to login when no token is present

BNormal flow

If the token is present and can be processed correctly:

  1. The token is extracted from the URL.
  2. The token is validated.
  3. Based on the user's status, a redirect occurs.

B.1 — User ready to access

The user is redirected to the main application view.

Successful autologin authentication

B.2 — Password change required

The user is redirected to the password change view.

Autologin with password change required

CError flow

Errors may occur if the token has expired, has already been used, does not exist, or if an internal error occurs during validation. In any of these cases, the system will redirect the user to the login page for manual authentication.

Autologin error flow

Security