Get started with the JavaScript SDK
Install @ovok/core, connect to the sandbox, sign in, and make a first request.
Install
npm install @ovok/coreCreate a client
import { Ovok } from '@ovok/core';
export const ovok = new Ovok({
baseUrl: 'https://api.sandbox.ovok.com',
tenantCode: 'your-tenant',
});Sign in
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.
Make a first request
const patients = await ovok.fhir.search('Patient', { _count: 10 });Next: full JavaScript SDK docs.
Last updated on