Skip to navigation

V2 to V3

This guide moves an app from a V2 SDK (the one that takes an owner ID, app name, version and secret) to V3. Your application, its users, licenses and settings stay exactly where they are. Only the code in your program changes.

If your app still calls /api/v1/ or uses a V1 build, read V1 to V3 instead.

What changes and what stays

Stays the sameChanges
The application in your dashboardThe SDK file or package
Users, passwords, licenses and plansFour connection values become one AppKey
Cloud variables and their valuesMethod names, which are now the same in every language
Bans, pauses, expiry dates and device limitsResults come back from each call instead of app.response
Allowed Versions and your download linkThe account details in userData have new names and types

Your V2 releases keep working while you move. The V2 API stays online for them, and both versions read the same records, so a ban in the dashboard applies to both.

The steps

  1. Copy your AppKey from the dashboard.
  2. Replace the V2 SDK file or package with the V3 one.
  3. Change the line that creates the client.
  4. Rename the methods you call, using the table below.
  5. Replace every app.response check with the result or error of the call.
  6. Update the code that reads userData.
  7. Raise your version number, add it to Allowed Versions and test with a test license.

Each step is explained below, with full before and after code for every language at the end.

1. Copy your AppKey

Open the dashboard, go to your application and copy its AppKey from the credentials section. It replaces the owner ID, app name and secret. Keep using the version number you already ship; V3 still checks it against Allowed Versions. See App credentials.

2. Replace the SDK

LanguageV2V3
C#NuGet AuthlyX 2.x, namespace AuthlyX, class AuthNuGet AuthlyX 3.x (dotnet add package AuthlyX --prerelease), namespace AuthlyXSDK, class AuthlyX
C++AuthlyX.h plus include/ and the prebuilt .lib or .dllOne file, AuthlyX.h, with nothing to link
Pythonauthlyx-api 2.x or AuthlyX.pypip install --pre authlyx-api, or the V3 AuthlyX.py
JavaScriptAuthlyX.js with requirenpm install authlyx@beta, with import
TypeScriptnpm authlyx 2.xnpm authlyx@beta (3.x)
JavaAuthlyX.java with Gsonapp/authlyx/AuthlyX.java with Jackson and Bouncy Castle
Goauthlyx.go in package mainThe authlyx package, imported as github.com/authlyx/sdk-go/v3
Rustsrc/authlyx.rs as a moduleThe authlyx-sdk-v3 crate, added as a path dependency

Remove the old file completely. Keeping both in one project leads to name clashes and confusing errors. The SDK downloads page has every V3 SDK, and each language has a full guide.

3. Create the client

LanguageV2V3
C#new Auth(ownerId, appName, version, secret)new AuthlyX("YOUR_APP_KEY", "1.0.0")
C++AuthlyX AuthlyXApp(ownerId, appName, version, secret);AuthlyX app("YOUR_APP_KEY", "1.0.0");
PythonAuthlyX(ownerId, appName, version, secret)AuthlyX("YOUR_APP_KEY", "1.0.0")
JavaScript, TypeScriptnew AuthlyX(ownerId, appName, version, secret)new AuthlyX("YOUR_APP_KEY", "1.0.0")
Javanew AuthlyX(ownerId, appName, version, secret)new AuthlyX("YOUR_APP_KEY", "1.0.0")
GoNewAuthlyX(ownerID, appName, version, secret, true, "")authlyx.NewAuthlyX(ctx, "YOUR_APP_KEY", "1.0.0")
RustAuthlyX::new(owner_id, app_name, version, secret, true, None, true)AuthlyX::new("YOUR_APP_KEY", "1.0.0").await?

The V2 antiDebug argument is gone. C# still accepts debug and api as named options. In the other languages, settings such as timeouts and update prompts go in an options object, listed at the end of each language guide.

4. Rename the methods

V2 used PascalCase in most languages. V3 uses the same camelCase names everywhere, except Go, which keeps Go’s capitalised style.

V2V3Notes
Init()init()initialize() also works. Go: Init(ctx)
Login(username, password)login(username, password)
Login(licenseKey) or LicenseLogin(key)login(licenseKey)Go, Java, Rust: licenseLogin(key) (Go: LicenseLogin)
Login(id, null, "motherboard") or DeviceLogin(type, id)deviceLogin()Works differently, see Device login
Register(username, password, key, email)registerUser(username, password, key)No email argument. Go: RegisterUser
ChangePassword(old, new)changePassword(old, new)
ExtendTime(username, licenseKey)redeemLicense(licenseKey)Adds the key’s time to the signed-in account
GetVariable(key)getVariable(name)Returns a result, not the bare text
SetVariable(key, value)updateVariable(name, value)
Log(message)log(message)
ValidateSession()hasAccess() or checkSession()The SDK also checks by itself in the background
IsInitialized(), GetSessionId()NoneCheck the result of init() instead
GetUpdateInfo(), IsUpdateAvailable(), updateDataThe result of init()V3 shows the update box itself; see Updates
GetChats, SendChatNoneChat was removed
CheckBlacklist()NoneBlocked IPs and SIDs are refused at sign-in
GetCurrentApplicationHash()buildHash optionSee Application hashes

5. Read results instead of app.response

This is the change that touches the most lines. In V2, every call stored its outcome in one shared object and you read it straight after:

app.Login(licenseKey);
if (app.response.success)
Console.WriteLine("Welcome");
else
Console.WriteLine(app.response.message);

In V3 there is no app.response. Each call gives back its own result. When AuthlyX refuses a sign-in, such as a wrong password, banned user or unknown license, the call raises an error instead, which you catch:

try
{
await app.login(licenseKey);
Console.WriteLine("Welcome");
}
catch (AuthlyXException error)
{
Console.WriteLine(error.Message);
}

If your compiler says 'AuthlyX' does not contain a definition for 'response' or class "AuthlyX" has no member "response", that line is V2 code still waiting to be changed.

LanguageV2 checkV3 sign-inV3 refused sign-in
C#app.response.successawait app.login(...)catch (AuthlyXException error)
C++AuthlyXApp.response.successapp.login(...).get()catch (const authlyx::error& e)
Pythonapp.response["success"]await app.login(...)except AuthlyXError as error
JavaScript, TypeScriptapp.response.successawait app.login(...)catch (error)
Javaapp.response.successapp.login(...).join()catch (CompletionException thrown)
Goapp.Response.Success_, err := app.LicenseLogin(ctx, key)err != nil
Rustapp.response.successapp.licenseLogin(&key).awaitErr(error)

init() is the exception: it returns a result with ok set to false for the usual problems (no internet, update required, app paused) instead of raising, so you check it with if (!started.ok).

V3 calls also do not block your window. V2 waited for the network on the calling thread; V3 C#, Python, JavaScript and TypeScript use await, C++ and Java return futures, and every SDK has callback forms for GUI apps. The language guides show each style.

6. Update the account details

V2 filled app.userData with text fields. V3 keeps userData, but the names follow one pattern in every language and dates and numbers have real types.

V2 fieldV3 fieldNotes
UsernameUsernameEmpty for license sign-ins
LicenseKeyLicenseKey
EmailEmail
SubscriptionPlanC# and C++ also keep Subscription as another name
SubscriptionLevelNoneUse plans and features instead
ExpiryDate (text)ExpiryDateC#: DateTimeOffset?. C++: text such as 2027/04/30 or Lifetime. Others: ISO text, or empty for lifetime
DaysLeftC++: DaysLeft. Others: work it out from ExpiryDateEach language guide has a daysLeft helper
HwidSIDC# and C++ also keep Hwid
IpAddressIpAddress
LastLogin, RegisteredAtC# and C++: LastLogin, RegisteredAt. Others: lastLogin, registeredAt
NoneFeatures, FeatureValues, Metadata, DeviceLimit, CountryNew in V3

How you reach the fields depends on the language:

LanguageV2V3
C#app.userData.Subscriptionapp.userData.Plan
C++AuthlyXApp.userData.subscriptionauto u = app.userData(); then u.Plan
Pythonapp.userData["Subscription"]app.userData.Plan or app.userData["Plan"]
JavaScript, TypeScriptapp.userData.subscriptionapp.userData.Plan
Javaapp.userData.Subscriptionapp.userData.path("Plan").asText("")
Goapp.UserData.Subscriptionuser, _ := app.UserData(ctx) then user["Plan"]
Rustapp.user_data.subscriptionapp.userData()["Plan"].as_str()

User data in C++

In V2, userData was a member you read directly. In V3 it is a function: app.userData() returns a copy of the account details. Call it once at the top of each function that needs them, then read from that copy.

V2V3
app.response.success before reading user datau.empty() is true when nobody is signed in, or use app.hasAccess()
app.userData.licenseKeyu.LicenseKey
app.userData.expiryDateu.ExpiryDate, for example 2027/04/30, or Lifetime
app.userData.daysLeftu.DaysLeft, which is 0 for lifetime or expired access
app.userData.subscriptionu.Subscription or u.Plan
(none)u.IsLifetime is true for lifetime access

V2:

std::string GetRemainingDays()
{
if (AuthlyXApp.userData.daysLeft > 0)
return std::to_string(AuthlyXApp.userData.daysLeft) + "D";
if (!AuthlyXApp.userData.expiryDate.empty())
return AuthlyXApp.userData.expiryDate;
return "N/A";
}
std::string BuildTopLine()
{
if (!AuthlyXApp.response.success || AuthlyXApp.userData.licenseKey.empty())
return " License: Null";
return " License: " + AuthlyXApp.userData.licenseKey + " | Expiry: " + AuthlyXApp.userData.expiryDate;
}

V3:

std::string GetRemainingDays()
{
auto u = app.userData();
if (u.Subscription.empty())
return "N/A";
if (u.IsLifetime)
return "Lifetime";
if (u.DaysLeft > 0)
return std::to_string(u.DaysLeft) + "D";
if (!u.ExpiryDate.empty())
return u.ExpiryDate;
return "N/A";
}
std::string BuildTopLine()
{
auto u = app.userData();
if (u.empty() || u.LicenseKey.empty())
return " License: Null";
return " License: " + u.LicenseKey + " | Expiry: " + u.ExpiryDate;
}

u is a local copy, so each function declares its own. See User Data for every field.

7. Ship it

  1. Raise the version in your code, for example from 1.4.0 to 2.0.0.
  2. In the dashboard, add the new version to Allowed Versions. Keep the old V2 version allowed until your users have updated.
  3. Sign in with a test license and a test user. Then ban, pause and expire them from the dashboard and check that the app reacts.
  4. Publish the new build and set your download link so V2 users are offered the update.

Device login is different

V2 device login sent a motherboard or processor serial number (Login(id, null, "motherboard")). V3 deviceLogin() signs in the current Windows user on a device you approved in the dashboard, with no ID to pass. Devices registered by serial number in V2 are not carried over automatically. If you used V2 device login, read Device login and approve your users’ devices again before you release.

Before and after, in every language

Each pair does the same thing: start, sign in with a license key, print the plan and expiry, and read a cloud variable called motd.

V2:

using System;
using AuthlyX;
static class Program
{
public static Auth app = new Auth(ownerId: "OWNER_ID", appName: "APP_NAME", version: "1.0.0", secret: "SECRET");
static void Main()
{
app.Init();
if (!app.response.success)
{
Console.WriteLine(app.response.message);
return;
}
app.Login(Console.ReadLine());
if (!app.response.success)
{
Console.WriteLine(app.response.message);
return;
}
Console.WriteLine("Plan: " + app.userData.Subscription);
Console.WriteLine("Expires: " + app.userData.ExpiryDate);
Console.WriteLine(app.GetVariable("motd"));
}
}

V3:

using System;
using System.Threading.Tasks;
using AuthlyXSDK;
static class Program
{
static AuthlyX app = new AuthlyX("YOUR_APP_KEY", "1.0.0");
static async Task Main()
{
var started = await app.init();
if (!started.ok)
{
Console.WriteLine(started.message);
return;
}
try
{
await app.login(Console.ReadLine());
}
catch (AuthlyXException error)
{
Console.WriteLine(error.Message);
return;
}
var u = app.userData;
Console.WriteLine("Plan: " + u.Plan);
Console.WriteLine("Expires: " + (u.IsLifetime ? "Lifetime" : u.ExpiryDate?.ToString("yyyy/MM/dd")));
var motd = await app.getVariable("motd");
Console.WriteLine(motd.data);
}
}

In these examples licenseKey (or license_key) stands for the text your user typed. Every V3 language guide ends with a complete program that reads it from the console.

What V3 adds

Once you are on V3 you also get:

Keep your customers signed in

Use the same license keys and usernames already stored on the application. Passwords carry over, so users sign in to the V3 build with the same details. Do not create a new application for V3, or the existing licenses will not be there.

A V2 session is not a V3 session. The first time a user opens the V3 build, they sign in once. After that, the SDK keeps them signed in in the background.

Test both releases together

  1. Sign in from the existing V2 release and the new V3 release using separate test accounts.
  2. Ban a test account and confirm both versions reject it.
  3. Repeat with pause, expiry and device reset.
  4. Confirm cloud variables show the same values in both.
  5. Check Allowed Versions before publishing. Add the new version while keeping the old one allowed for the transition.
  6. Keep the previous installer available until the new release is proven.

If something goes wrong

Write down the error code and request ID the SDK reports. Stop the rollout, point your download link back to the previous release, and investigate with a test account. Do not restore an older database backup because one client fails: new customer changes may have arrived since that backup.

V2 stays online as Legacy and V1 as End of support. Those labels do not turn anything off. Any future shutdown will be announced with its own date.