> This page is for version V3 - Beta (default).
> For other versions, use one of these documentation indexes:
> - V3 - Beta (default): https://docs.authlyx.dev/v3/llms.txt
> - V2 - Legacy: https://docs.authlyx.dev/v2/llms.txt
> - V1 - End of support: https://docs.authlyx.dev/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.authlyx.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.authlyx.dev/_mcp/server.

# Register

> Create an app user using an unused license.

Register creates a username and password account from an unused license. It signs the new user in when the request succeeds. The developer's app must already allow registration.

**SDK version:** V3 Beta. These examples use the current downloads. V1 and V2 use different APIs; choose them in the version selector.

Each example assumes `app` is the AuthlyX client you created in [Connect your app](/v3/guides/quickstart). When a method takes a callback, AuthlyX calls it after the reply arrives. A name such as `result` inside that callback is created there; you do not declare it at the top of your file. For C++ futures, Python or JavaScript `await`, Java futures, Go errors and Rust `?`, read [Results](/v3/sdks/methods/results).

#### C\#

```csharp
app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY", result =>
{
    Console.WriteLine(result.ok ? "Account created" : result.message);
});
```

#### C++

```cpp
auto result = app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY").get();
if (result.ok())
    std::cout << "Account created and signed in\n";
else
    std::cout << result.message << '\n';
```

#### Python

```python
app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY", completed=lambda result: print("Account created and signed in" if result.ok else result.message))
```

#### JavaScript / Node.js

```javascript
app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY", result => console.log(result.ok ? "Account created and signed in" : result.message));
```

#### TypeScript

```typescript
app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY", result => console.log(result.ok ? "Account created and signed in" : result.message));
```

#### Java

```java
app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY")
    .thenAccept(result -> System.out.println(result.ok() ? "Account created and signed in" : result.message()));
```

#### Go

```go
result, err := app.RegisterUser(ctx, "YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY")
if err != nil {
    return err
}
if result.Success {
    fmt.Println("Account created and signed in")
} else {
    fmt.Println(result.Message)
}
```

#### Rust

```rust
let result = app.registerUser("YOUR_USERNAME", "YOUR_PASSWORD", "YOUR_LICENSE_KEY").await?;
if result.success {
    println!("Account created and signed in");
} else {
    println!("{}", result.message);
}
```

A license can only be used for registration once. A successful registration consumes the unused license and creates a username identity linked to it.