# Required Parameters

These parameters are mandatory for a successful launch. **Applies to: All integrations.**

| Parameter | Type | Description |
|-----------|------|-------------|
| userId | string | Unique identifier of your user. Nothing is verified without it, and a value shorter than 2 characters posts `error_occurred` (`severity: "critical"`, `"User ID is missing: ..."`). Used for progress, analytics and personalization |
| company | string | Your company name. Compared in lowercase. The value as you sent it is the default `themeName` |
| key | string | Your API key, sent as the `x-api-key` header of the verify call. Required unless you send `session` |
| session | string | A short-lived session id created by your backend with your API key ([Sessions API](/docs/trainer-api/trainer-api-sessions)), sent as the `x-session-id` header. Send it instead of `key` so the key never ships inside your app. When both are present, `session` is used. On session launches the backend's subscription status overrides `isSubscribed` |

**Replies:** `kinestex_launched` when the launch is verified, or `error_occurred` (`severity: "critical"`, `"Cannot verify: ..."`) when it is not.

**SDK Support:**
- **Swift, Kotlin, Flutter:** `apiKey`, `companyName` and `userId` are arguments of the SDK setup. For session auth, leave out `apiKey` and pass `"session"` in `customParams` of the create call.
- **React Native:** `data.key` or `data.session`, plus `data.company` and `data.userId`.
- **React (`kinestex-sdk-react-ts`):** `key`, `company` and `userId` are required. This SDK has no session field.
- **HTML/JS:** top-level keys of the launch object.

**Required Parameters Setup**

_Swift (iOS)_
```swift
// API key
let kinestex = KinesteXAIKit(
    apiKey: "YOUR_API_KEY",
    companyName: "YOUR_COMPANY",
    userId: "unique-user-id"
)

// Session auth: leave out apiKey and pass the session in customParams of the create call,
// e.g. customParams: ["session": sessionId]
let kinestexWithSession = KinesteXAIKit(
    companyName: "YOUR_COMPANY",
    userId: "unique-user-id"
)
```

_Kotlin (Android)_
```kotlin
// API key. For session auth, leave out apiKey and pass
// customParams = mutableMapOf("session" to sessionId) to the create call.
KinesteXSDK.initialize(
    context = this,
    apiKey = "YOUR_API_KEY",
    companyName = "YOUR_COMPANY",
    userId = "unique-user-id"
)
```

_React Native_
```jsx
const postData: IPostData = {
  key: 'YOUR_API_KEY', // or session: sessionId
  userId: 'unique-user-id',
  company: 'YOUR_COMPANY',
};
```

_Flutter_
```dart
// API key. For session auth, leave out apiKey and pass
// customParams: {"session": sessionId} to the create call.
await KinesteXAIFramework.initialize(
  apiKey: "YOUR_API_KEY",
  companyName: "YOUR_COMPANY",
  userId: "unique-user-id",
);
```

_HTML / JavaScript_
```html
const postData = {
  userId: "unique-user-id",
  company: "YOUR_COMPANY",
  key: "YOUR_API_KEY", // or session: sessionId
};
```

_React (TypeScript)_
```tsx
// kinestex-sdk-react-ts requires key (no session field)
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'unique-user-id',
  company: 'YOUR_COMPANY',
};
```

---
Source: https://www.kinestex.com/docs/customization-parameters/required-parameters · Index: https://www.kinestex.com/llms.txt
