# Get started with the JavaScript SDK

Canonical page: https://docs.ovok.com/get-started/sdks/javascript

## Install [#install]

```bash
npm install @ovok/core
```

## Create a client [#create-a-client]

```ts
import { Ovok } from '@ovok/core';

export const ovok = new Ovok({
  baseUrl: 'https://api.sandbox.ovok.com',
  tenantCode: 'your-tenant',
});
```

## Sign in [#sign-in]

```ts
const result = await ovok.auth.login({
  profileType: 'Practitioner',
  email: 'ada@example.com',
  password,
});

if (result.status === 'mfa-required') {
  await ovok.auth.verifyMfa(result.challenge, codeFromAuthenticatorApp);
}
```

A server can pass `clientId` and `clientSecret` instead; see [Sign users in](/web-sdk/core/guides/sign-in).

## Make a first request [#make-a-first-request]

```ts
const patients = await ovok.fhir.search('Patient', { _count: 10 });
```

Next: [full JavaScript SDK docs](/web-sdk).
