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.
Use case
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)
RecommendedDesigned 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
| Aspect | Ephemeral | Static |
|---|---|---|
| Reusable | No (single use) | Yes, until revoked/expired |
| Lifetime | Fixed 120 seconds | No expiration or configurable expiresAt |
| Revocation | N/A (auto-expires) | Explicit, from the group panel |
| Concurrent tokens | Unlimited | Only 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.
| Header | Value |
|---|---|
| X-API-Key | ${MANAGEMENT_GROUP_API_KEY} |
| Content-Type | application/json |
API Key Management
Request
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
{
"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
| Field | Type | Description |
|---|---|---|
| targetUsername | string | Email of the target user. Required. |
| label | string (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. |
| expiresAt | string · 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
| Field | Description |
|---|---|
| targetUsername | Email of the user associated with the URL. |
| autologinUrl | Ready-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. |
| expiresAt | Configured 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.
Only one active URL per user
URL is returned only once
Request
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
{
"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 -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"
}'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.
How to rotate a URL
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
| Code | Description |
|---|---|
| 200 | The auto login token has been generated successfully. |
| 400 | Invalid request. May be due to a missing X-API-Key header, a malformed email, or an invalid body. |
| 400 | The target user does not belong to the same group as the requester (applies to both endpoints). |
| 400 | Persistent endpoint only: an active static token already exists for that targetUsername. Revoke it from the panel before generating a new one. |
| 401 | Unauthorized. 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. |
| 401 | The target merchant has been deleted (soft-deleted): the token is not redeemed even if it is still valid. |
| 403 | The API key does not belong to a group. Only a group can generate Auto Login URLs (on both endpoints); merchant and integrator keys cannot. |
| 500 | Internal 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.
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 -->
<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.
- Extract the token included in the autologin URL.
- Validate the token, checking its validity and expiration.
- 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.
- The system attempts to extract the token from the URL.
- Token not found — the user is redirected to the login page.

BNormal flow
If the token is present and can be processed correctly:
- The token is extracted from the URL.
- The token is validated.
- Based on the user's status, a redirect occurs.
B.1 — User ready to access
The user is redirected to the main application view.

B.2 — Password change required
The user is redirected to the password change view.

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.

Security
Ephemeral URLs
Static URLs