Skip to navigation

V1 to V3

V1 is the original AuthlyX API, the one under /api/v1/. It is out of support, so if your app still uses it, move straight to V3. There is no need to stop at V2 on the way: V3 does everything V2 does and more, and the move takes the same amount of work.

Your application, users, licenses, plans and cloud variables stay where they are. Only the code in your program changes.

How V1 and V3 differ

V1V3
Connection detailsOwner ID, app name, version and secretAppKey and version
How your code talks to AuthlyXYour own HTTP requests, or an old SDK buildAn official SDK for your language
SessionsA session_id you keep and send with every requestHandled inside the SDK
Staying signed inYou call validate-session yourselfThe SDK checks in the background
RepliesPlain JSONSigned, and checked by the SDK before your code sees them
Device IDThe sid or hwid you sendRead by the SDK, bound to this Windows user and install
UpdatesAn update object you handleThe SDK shows the update box for you

The biggest change is that you stop writing HTTP requests. Each V1 route becomes one SDK call.

The steps

  1. Copy your AppKey from the dashboard.
  2. Add the V3 SDK for your language.
  3. Replace your V1 requests with SDK calls, using the table below.
  4. Replace the fields you read from V1 replies.
  5. Remove your own session and validation code.
  6. Raise your version, add it to Allowed Versions and test with a test license.

1. Copy your AppKey

Open the dashboard, go to the same application your V1 build uses, and copy its AppKey. It replaces owner_id, app_name and secret. Do not create a new application, or your existing licenses and users will not be there. See App credentials.

2. Add the V3 SDK

Pick your language on the SDK downloads page. Each one has a page that shows how to add it to a project and a full guide that walks through every call. If your V1 integration lived inside an old SDK file, delete that file first.

3. Replace each route

V1 routeV3 callNotes
POST /api/v1/initinit()Takes no arguments; the AppKey and version come from the client
POST /api/v1/loginlogin(username, password)
POST /api/v1/licenseslogin(licenseKey)Java, Go and Rust: licenseLogin(key)
POST /api/v1/device-authdeviceLogin()Works differently, see Device login
POST /api/v1/registerregisterUser(username, password, licenseKey)V3 has no email argument
POST /api/v1/change-passwordchangePassword(current, new)
POST /api/v1/extendredeemLicense(licenseKey)For the signed-in user
POST /api/v1/variablesgetVariable(name)
POST /api/v1/variables/setupdateVariable(name, value)
POST /api/v1/logslog(message)
POST /api/v1/validate-sessionhasAccess() or checkSession()The SDK also checks on its own
POST /api/v1/licenses/verifyNoneSign in with the key instead; V3 tells you straight away if it is banned, paused or expired
Chat routesNoneChat was removed

You no longer send session_id, sid, hwid, ip or hash. The SDK handles the session and the device, AuthlyX reads the IP address from the connection, and the build hash moves to the buildHash option. See Application hashes.

4. Replace the reply fields

V1 replies had the account inside user, license or device. In V3 the same details are in userData once sign-in succeeds, whichever way the user signed in.

V1 reply fieldV3 userData fieldNotes
success, messageThe call’s result, or the error it raisesSee below
user.usernameUsername
user.linked_license_key, license.license_keyLicenseKey
user.email, license.emailEmail
subscriptionPlan
subscription_levelNoneUse plans and features
expiry_dateExpiryDateEmpty or null for lifetime access
days_leftWork it out from ExpiryDateC++ has DaysLeft; each guide has a helper
device_limit, max_devicesDeviceLimit
sid, hwidSID
last_login, registered_atlastLogin, registeredAtC# and C++: LastLogin, RegisteredAt
codecode on the result or errorSome codes, such as LICENSE_EXPIRED, keep their names. The full list is on Errors

success and message

With V1 you checked success in the JSON. In V3 a successful call returns normally and a refused sign-in raises an error you catch. The error’s message is ready to show to your user:

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

init() is the one call that does not raise for the usual problems. It returns a result with ok set to false and a code such as UPDATE_REQUIRED, so check it with an if.

A network failure is reported separately from a refusal. An error with kind network means AuthlyX could not be reached, so never treat it as a ban.

5. Remove your session code

Delete the code that stored session_id, called validate-session on a timer and handled SESSION_EXPIRED. The V3 SDK does all of that. If you want to know when AuthlyX ends a session, for example after a ban, each SDK has an event for it. See Sessions and heartbeats.

6. Ship it

  1. Raise the version in your code.
  2. Add the new version to Allowed Versions, keeping the V1 version allowed until users have updated.
  3. Test with a test license and a test user: sign in, then ban, pause and expire them from the dashboard and check that the app reacts.
  4. Publish the build and point your download link at it.

Device login

V1 device-auth took a motherboard or processor serial number. V3 deviceLogin() signs in the current Windows user on a device you approved in the dashboard, with no ID to pass. Serial-number devices from V1 are not carried over, so approve your users’ devices again before you release. See Device login.

Example: a V1 request and the V3 call

V1, sent by your own code:

POST /api/v1/licenses
{
"session_id": "dc1ce...a3a75",
"license_key": "MAYA-4R8P-2N6K-9Q3W",
"sid": "S-1-5-21-..."
}

V3, in each language:

try
{
await app.login("MAYA-4R8P-2N6K-9Q3W");
Console.WriteLine(app.userData.Plan);
}
catch (AuthlyXException error)
{
Console.WriteLine(error.Message);
}

For complete before and after programs, see the V2 to V3 guide: its V3 side is exactly what a V1 app ends up with too.

Keep your customers signed in

Users keep their usernames, passwords and license keys. The first time they open the V3 build they sign in once, and the SDK keeps them signed in from then on. Your V1 build keeps working alongside it during the move, and a ban, pause or expiry in the dashboard applies to both.

Test both releases together

  1. Sign in from the V1 build and the V3 build with separate test accounts.
  2. Ban a test account and confirm both builds reject it.
  3. Repeat with pause, expiry and device reset.
  4. Confirm cloud variables match in both.
  5. Keep the previous installer available until the new release is proven.