LogoRecal
JS/TS SDK

Introduction

Start integrating Recal's API with TypeScript

Getting Started

The Recal JavaScript SDK is an open-source software development kit for interacting with the Recal API using JavaScript and TypeScript. Build sophisticated calendar integrations with support for Google Calendar and Microsoft Outlook.

Security note: This SDK is designed for server-side use. Never expose your API token in client-side code.


Features

  • Multi-Provider Support: Seamlessly work with Google Calendar and Microsoft Outlook
  • Type Safety: Full TypeScript support with runtime validation
  • Rich Calendar Operations: Events, busy queries, scheduling, and more
  • Organization Management: Handle organization and user calendars
  • OAuth Integration: Built-in OAuth flow support for calendar connections
  • Error Handling: Comprehensive error types for robust applications
  • Modern Architecture: Clean, testable service-based design

Setup

Create an Account & Get API Key

  1. Sign up for a Recal account
  2. Log in to your Recal dashboard
  3. Navigate to "API Keys" in the sidebar
  4. Create a new API key and copy it to a secure location

Set Up OAuth Providers

  1. Go to "OAuth Credentials" in the sidebar
  2. Enter your OAuth Client ID and Secret
  3. Save your credentials

To get the client ID and secret for each provider, follow the guides below:

Install the SDK

Choose your preferred package manager to install the Recal SDK:

# npm
npm install recal-sdk

# bun
bun add recal-sdk

# yarn
yarn add recal-sdk

Initialize the SDK

Import and initialize the SDK with your API key:

import { Recal } from 'recal-sdk';

const recal = new Recal({
  token: "<RECAL_TOKEN>"
});

You can also use environment variables:

// Reads from process.env.RECAL_TOKEN
const recal = new Recal();

Note: RecalClient is available as an alias for backward compatibility, but Recal is the recommended import.

Test Your Connection

import { Recal } from 'recal-sdk';

const recal = new Recal({
  token: "<RECAL_TOKEN>"
});

const orgs = await recal.organizations.list();
console.log(orgs); // should log [] if you have no organizations

Contribute to the SDK

The Recal Node.js SDK repository contains the Node.js SDK. You can contribute to the SDK by creating an issue or opening a pull request.


On this page