Class: HeuristikClient
Defined in: index.ts:76
The main Heuristik SDK client.
Exampleβ
const client = new HeuristikClient({ apiKey: 'sk_live_...' });
const session = await client.createSession({ referenceId: 'user-123' });
console.log(session.token);
Constructorsβ
Constructorβ
new HeuristikClient(
config):HeuristikClient
Defined in: index.ts:86
Creates a new Heuristik client instance.
Parametersβ
configβ
Configuration options including API key
Returnsβ
HeuristikClient
Throwsβ
Error if apiKey is not provided
Methodsβ
createSession()β
createSession(
options):Promise<Session>
Defined in: index.ts:100
Creates a new verification session.
Parametersβ
optionsβ
Session creation options
Returnsβ
Promise<Session>
The created session with a token for SDK initialization
getSession()β
getSession(
sessionId):Promise<Session>
Defined in: index.ts:121
Retrieves a session by its unique identifier.
Parametersβ
sessionIdβ
string
The UUID of the session to retrieve
Returnsβ
Promise<Session>
The session details