ReferenceTypeScript ClientGet Started

Synnax TypeScript Client

Learn how to use our TypeScript client to interact with a Synnax Core.

Installation

The TypeScript client is available on npm, and can be installed with your package manager of choice. We’ll be using npm in our documentation, but feel free to use yarn, pnpm, or any other package manager you prefer.

npm install @synnaxlabs/client

Authenticating with a Core

To authenticate with a Synnax Core, simply instantiate a new client with your connection parameters and credentials:

import { Synnax } from "@synnaxlabs/client";

const client = new Synnax({
  host: "demo.synnaxlabs.com",
  port: 9090,
  username: "synnax",
  password: "seldon",
  secure: true,
});

Here’s a breakdown of the parameters you can pass to the client:

ParameterDescription
hostThe hostname of the Synnax Core
portThe port of the Synnax Core
usernameThe username to authenticate with
passwordThe password to authenticate with.
secureWhether to use TLS encryption.