> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dictation SDK Authentication

> Sign in to Suki before dictation opens: use SukiAuthManager with the Partner ID and Partner Token Suki gives you

The Dictation SDK uses a helper called **`SukiAuthManager`** from the **`@suki-sdk/core`** package. You give it the **`partnerId`** and **`partnerToken`** Suki assigned to your app. You create this helper **once**, then hand it to **`DictationClient`** in JavaScript or to **`DictationProvider`** in React.

After sign-in works, Suki can show the dictation experience (the screen users talk to) inside your page. The helper also renews access when it expires. If the ID or token is wrong, or sign-in never finishes, that dictation screen will not appear.

## Prerequisites

Before you set up **`SukiAuthManager`**, you must have:

* **Partner ID** (the **`partnerId`** value): Suki gives you this when you complete [Partner onboarding](/documentation/partner-onboarding).
* **Partner Token** (the **`partnerToken`** value): The access value your program uses for this SDK. Your Suki contact explains how you get it and what it looks like.

## Use SukiAuthManager for authentication

Create the helper when your app already knows **`partnerId`** and **`partnerToken`** by running the following code:

```javascript JavaScript expandable theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
import { SukiAuthManager } from "@suki-sdk/core";

const authManager = new SukiAuthManager({
  partnerId: "YOUR_PARTNER_ID", // required
  partnerToken: "YOUR_PARTNER_TOKEN", // required
  environment: "staging", // optional: "staging" or "production" (default "production")
  loginOnInitialize: true, // optional (default false)
  autoRegister: false, // optional (default false); when true, provider fields below are often required
  providerId: "YOUR_PROVIDER_ID", // optional; provider identifier in your system
  providerName: "YOUR_PROVIDER_NAME", // optional; full name, often required if autoRegister is true
  providerOrgId: "YOUR_PROVIDER_ORG_ID", // optional; org in your system, often required if autoRegister is true
  providerSpecialty: "FAMILY_MEDICINE", // optional; often required if autoRegister is true
});
```

For values you can pass as **`providerSpecialty`**, see [Specialties](/documentation/specialties).

## What SukiAuthManager does

* **Checks** your settings before dictation tries to open.
* **Signs in** to Suki's platform with your partner details.
* **Renews access** when the SDK needs a fresh session.
* **Lets** Suki's hosted dictation UI run with the right permissions.

<Warning>
  A bad **`partnerId`** or **`partnerToken`** stops dictation from loading. Users will not see the dictation UI until sign-in succeeds.
</Warning>

Refer to [AuthConfig](/dictation-sdk/guides/configuration#authconfig) section in [Configuration](/dictation-sdk/guides/configuration) guide for more details on the available options and how to use them.

<Note>
  If **`autoRegister`** is on, you may need extra **provider metadata**. Check your package README or ask your Suki contact.
</Note>

## Sign in later instead of on create

You can create **`SukiAuthManager`** first and call **`login()`** when your app is ready, instead of **`loginOnInitialize: true`**. Use whatever pattern your installed SDK version supports.

## Next steps

<Icon icon="file-lines" iconType="solid" /> Refer to [Quickstart](/dictation-sdk/quickstart) guide to get started with the Dictation SDK.
