Session Lifecycle
Set the key, start the library, sign in, sign out. Every app does these in this order.
The whole flow
#include <Atlas.h>#include <iostream> int main() { Atlas::API_KEY = "YOUR_API_KEY"; Atlas::Startup(); if (!Atlas::License::Login("ATLAS-A9F2K-4RMXM")) { std::cout << Atlas::Data::GetErrorMessage() << std::endl; return 1; } RunApp(); Atlas::Logout(); return 0;}API_KEY
Set API_KEY before Startup(). Either inline in the source, or override at runtime from your own config / environment variable.
Atlas::API_KEY = "YOUR_API_KEY";Atlas::Startup();Startup
Startupvoid Startup();It loads the API key, checks your app file, and looks for a newer version of your app. It waits until it is done. If it fails, JavaScript throws an error, Python raises RuntimeError, and a C++ process ends.
Login
Takes a license key or a username/password. See License and Account for the full surface.
On success the heartbeat and integrity threads start. On failure no threads start and no partial state is left behind.
Logout
Logoutvoid Logout();Tells the server to end the session, closes the connection, zeroes the session token and authentication state, and stops the heartbeat. The SDK stays loaded - a subsequent Login works without re-running Startup.
Exit
Exitvoid Exit();Uncatchable at the OS level. Reserved for fatal paths. The SDK terminates the process directly - bypassing user-mode exit paths, dialogs, and exception handlers. SEH, VEH, and vectored handlers don't fire. No MessageBox, no crash dialog. JS types it as never and Python returns None - the process ends inside the call, so the return is unreachable.