Getting started
Open your first Blazeauth WebSocket session, initialize it, and authorize with a license or account.
Getting started
This guide walks you through a minimal Blazeauth integration using WebSocket sessions.
Prerequisites
Before you write any code, you need:
- An application in the Blazeauth dashboard
- An environment API key (
socket_api_key) - At least one test license key (for license-based auth) or an account (for credentials-based auth)
1) Choose a stable client_id
Blazeauth uses client_id to bind licenses and accounts to a device/machine.
Requirements:
- Keep it stable per installation/machine
- Keep it reasonably short (do not send extremely long ids)
2) Connect to Blazeauth
Connect using WebSocket over TLS:
wss://eu1.blazeauth.net
Implement it in any language
If you are not using the Blazeauth C++ SDK, follow the raw protocol guide: /docs/guides/any-language/websocket-client. It documents the exact message envelope, correlation rules, binary transfers, and reconnection logic.
3) Initialize the session
You must send initialize within 15 seconds after opening the WebSocket connection.
If status = 1, the connection is initialized and you can call other endpoints.
4) Authorize the session
Choose one of the flows below.
Use this flow when you distribute a license key to the user (desktop apps, games, offline installers, etc.).
On success (status = 1), the session becomes authorized.
Use this flow when your application has user accounts.
Notes:
- If
license_required = true, the account requires a valid license/subscription in Blazeauth. - You can optionally pass
licenseinauth_by_credentialsto activate it in the same call.
5) Next steps
Once authorized, you can:
- Download protected files using
transfer_file - Read variables using
get_variable - Read license/account state using
get_current_licenseorget_current_account