> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/sdks-and-cli/membership/passkeys-recovery/use-recovery-code.md).

# Use Recovery Code

These endpoints power passwordless sign-in (passkeys / WebAuthn) and account recovery (magic links, recovery codes, email verification) for your app's end users. Uses the recovery code.

This method is on the runtime **API** surface (`norbix.api.membership`) — call it from your app.

{% hint style="info" %}
These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See [Install a Norbix SDK](/sdks-and-cli/install.md).
{% endhint %}

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.api.membership.useRecoveryCode({
  email: 'alice@example.com',
  recoveryCode: 'ABCD-EFGH-IJKL',
});
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;
using Norbix.Sdk.Types.Api;

using var client = new NorbixClient();

var result = await client.Membership.UseRecoveryCodeAsync(new UseRecoveryCodeRequest
{
    Email = "alice@example.com",
    RecoveryCode = "ABCD-EFGH-IJKL",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixApi

norbix = NorbixApi()

result = norbix.membership.use_recovery_code(
    email="alice@example.com",
    recoveryCode="ABCD-EFGH-IJKL",
)
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
err := c.API.Membership.UseRecoveryCode(ctx, map[string]any{
	"email": "alice@example.com",
	"recoveryCode": "ABCD-EFGH-IJKL",
}, &result)
```

{% endtab %}

{% tab title="Dart / Flutter" %}

```dart
import 'package:norbix/norbix_api.dart';

final api = NorbixApi();

final result = await api.membership.useRecoveryCode(body: {
  'email': 'alice@example.com',
  'recoveryCode': 'ABCD-EFGH-IJKL',
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixSwift

let client = Norbix()

let result = try await client.api.membership.useRecoveryCode([
    "email": "alice@example.com",
    "recoveryCode": "ABCD-EFGH-IJKL",
])
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
import dev.norbix.sdk.api.NorbixApi

val api = NorbixApi()

val result = api.membership.useRecoveryCode(mapOf(
    "email" to "alice@example.com",
    "recoveryCode" to "ABCD-EFGH-IJKL",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix api membership recovery code use --email alice@example.com --recoveryCode ABCD-EFGH-IJKL
```

{% endtab %}
{% endtabs %}

## In the dashboard

Manage this visually in Norbix Cloud — see [Membership → Passkeys & Recovery](/norbix-cloud/membership.md).

## API reference

Full request and response for this endpoint: [Use Recovery Code](/api-reference/membership/passkeys-recovery/use-recovery-code.md).
