V1 to V2
V2 is the Legacy version. If you are changing your app anyway, go straight to V3 with the V1 to V3 guide. It is the same amount of work and you will not have to move again. Use this page only if you must stay on the V2 contract for now, for example because a V2 SDK is already built into your tools.
V1 and V2 use the same application details, the same routes and the same request fields. Your users, licenses, plans and variables are shared, so nothing in the dashboard changes. What V2 adds is protection for the conversation between your app and AuthlyX: every request carries a one-time ID, and every reply is signed.
What changed from V1
Everything else, including the reply fields, error codes and update information, is the same.
If you use an SDK
The V2 SDKs do all of the above for you. Replace your V1 file or package with the V2 SDK for your language, keep the same four values, and rebuild:
The V2 SDKs come with these calls. Names are PascalCase in C#, C++, Python, JavaScript, TypeScript, Java and Go, and snake_case in Rust:
In Go, pass empty strings for the values you do not use, as in Login(licenseKey, "", ""). In Rust, pass None, as in login(&key, None, None).
After each call, read app.response.success and app.response.message, and after sign-in read app.userData. The V2 docs cover the V2 contract in full.
If you call the API yourself
1. Change the address
Replace /api/v1/ with /api/v2/ in every request. Then call init again: V1 sessions do not work on V2.
2. Send a request ID, nonce and timestamp
Every V2 request needs three extra values. Send them as headers or as fields in the JSON body. If you send both, they must match.
A request ID and nonce pair can be used once. Sending the same pair again within 10 minutes is refused with AUTH_REPLAY_DETECTED. A clock that is more than 5 minutes off is refused with AUTH_INVALID_TIMESTAMP.
3. Check the reply signature
Every V2 reply, including errors, carries these headers:
To check a reply:
- Confirm
x-v2-request-idandx-v2-noncematch what you sent. If they do not, discard the reply. - Rebuild the signed text: the value of
x-v2-signature-ts, a newline, the request ID, a newline, the nonce, a newline, then the reply body as canonical JSON. Canonical JSON means object keys sorted alphabetically at every level and no spaces between values. - Verify the base64 signature over that text with the AuthlyX V2 public key for the key ID in
x-v2-signature-kid. Use the public key that ships in the V2 SDKs. - Only then trust
successand the rest of the body.
If the signature is missing or wrong, treat the reply as if the request failed. Do not unlock anything.
4. Send sid on extend
POST /api/v2/extend needs sid or hwid, the same identifier you send at sign-in.
Test it
- Start a V2 session and sign in with a test license, a test user and, if you use it, a test device.
- Send the same request twice and check that the second one is refused.
- Change one character of a reply body in a debugger and check that your app rejects it.
- Ban, pause and expire the test account in the dashboard and check that
validate-sessionreports it. - Add the new version to Allowed Versions before you ship, and keep the V1 version allowed until users have updated.

