> 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.

# Change password

> Change the password for the signed-in username account.

Use this method after a user has signed in with a username and password. They must provide their current password and the new password. This changes the account password; it does not sign out other sessions unless your app separately ends them.

**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). Read [Results](/v3/sdks/methods/results) for how each language receives the answer.

#### C\#

```csharp
app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD", result =>
{
    Console.WriteLine(result.ok ? "Password changed" : result.message);
});
```

#### C++

```cpp
auto result = app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD").get();
std::cout << (result.ok() ? "Password changed" : result.message) << '\n';
```

#### Python

```python
app.changePassword(
    "CURRENT_PASSWORD",
    "NEW_PASSWORD",
    completed=lambda result: print("Password changed" if result.ok else result.message),
)
```

#### JavaScript / Node.js

```javascript
app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD", result => {
    console.log(result.ok ? "Password changed" : result.message);
});
```

#### TypeScript

```typescript
app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD", result => {
    console.log(result.ok ? "Password changed" : result.message);
});
```

#### Java

```java
app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD")
    .thenAccept(result -> System.out.println(result.ok() ? "Password changed" : result.message()));
```

#### Go

```go
result, err := app.ChangePassword(ctx, "CURRENT_PASSWORD", "NEW_PASSWORD")
if err != nil {
    return err
}
if !result.Success {
    fmt.Println(result.Message)
}
```

#### Rust

```rust
let result = app.changePassword("CURRENT_PASSWORD", "NEW_PASSWORD").await?;
if !result.success {
    println!("{}", result.message);
}
```

Never log passwords or send them to your own analytics. Use the SDK's result to show a success or error message in your own interface.