> This page is for version V2 - Legacy.
> For other versions, use one of these documentation indexes:
> - V3 - Beta (default): https://docs.authlyx.dev/v3/llms.txt
> - V2 - Legacy: https://docs.authlyx.dev/v2/llms.txt
> - V1 - End of support: https://docs.authlyx.dev/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.authlyx.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.authlyx.dev/_mcp/server.

# Connect your app

> AuthlyX V2: connect your app.

## Copy your application details

Use the details of the same application that contains your licenses and users. Keep the existing owner ID unchanged when moving an account.

## Initialize

Send `POST /api/v2/init` with the four connection fields:

```json
{
  "owner_id": "459010927960",
  "app_name": "MyApp",
  "version": "1.0.0",
  "secret": "YOUR_APPLICATION_SECRET"
}
```

The secret above is a placeholder: paste your own application's secret when testing privately. Never put an Elite Key here.

Initialization returns the legacy session information. Keep that session in memory and use it for the next request. Initialization alone does not sign in a customer.

## Choose how the customer signs in

| Access   | Route                 | Credentials                      |
| -------- | --------------------- | -------------------------------- |
| Username | `/api/v2/login`       | Username, password and system ID |
| License  | `/api/v2/licenses`    | License key and system ID        |
| Device   | `/api/v2/device-auth` | Device type and device ID        |

Use the API Reference for the complete request fields, including `session_id`. Do not add V3 challenge headers to these requests.

## Keep checking access

Call `/api/v2/validate-session` while protected features are in use. A successful sign-in is not a permanent approval. A developer can later pause, ban or expire access.

If access is rejected, stop protected operations and let the customer sign in again. A connection failure is different from a server response that says the license is banned.