Skip to main content
This guide gets you calling Voyant services from a TypeScript project in a few minutes.

Prerequisites

  • A Voyant account and an API token. Mint one in the dashboard tokens UI, or with the CLI after voyant login.
  • Node.js 22.12 or newer.

Install the SDK

Create a client

The client reads your API token and points at https://api.voyant.travel by default.
Keep your API token on the server. It carries the scopes that authorize real actions like sending messages and reading secrets. For browser clients that need realtime, mint a short-lived client token instead. See Realtime.

Make a call

Each service is a group on the client. Here are one-line examples across several services:

Handle errors

Any non-2xx response throws a VoyantApiError carrying the HTTP status, a requestId, and the response body. Always preserve the request id in logs and support requests:
See Errors and transport for the full transport behavior shared across the SDKs.

Next steps

Messaging

SMS, email, and verification in depth.

All services

Browse the full Cloud service catalog.