Skip to main content
@calcom/atoms is in maintenance mode. Existing integrations keep receiving fixes and new versions on npm, but no new atoms are planned for this package: the next generation of Atoms will be distributed as copy-and-paste components built on coss ui and API v2. New integrations should start from API v2.
This guide walks you through setting up Cal.com Atoms in your application using OAuth authentication.

1. Create an OAuth client

First, create an OAuth client to enable user authentication:
  1. Go to https://app.cal.com/settings/developer/oauth
  2. Create a new OAuth client with:
    • Name: Your application name
    • Redirect URIs: URLs where users are redirected after authorization (e.g., https://yourapp.com/callback)
Your OAuth client will be reviewed by Cal.com. Once approved, you can use it to authenticate users. See the OAuth documentation for complete details.

2. Implement the OAuth flow

When a user wants to connect their Cal.com account:
  1. Redirect to authorization URL
  1. Handle the callback
After authorization, the user is redirected to your callback URL with a code parameter.
  1. Exchange code for tokens

3. Set up a token refresh endpoint

Access tokens expire after 30 minutes. Create an endpoint that atoms can call to refresh tokens:

4. Install the atoms package

5. Tailwind version compatibility

If your project utilizes Tailwind CSS, please ensure you import the CSS bundle that corresponds to your specific version. Atoms provides two distinct bundles to maintain compatibility across versions:
  • Tailwind CSS v4:
  • Tailwind CSS v3:
To prevent styling conflicts or unexpected behavior, please only include the import that matches your project’s Tailwind version.

6. Configure the OAuth provider

For atoms to work, the root of your application must be wrapped with CalOAuthProvider. This provider handles authentication and token management for all atoms in your app.
See the CalOAuthProvider documentation for all available props and advanced configuration.
For all provider properties see Cal OAuth Provider docs.

7. Start using atoms

Now you can use any atom in your components:

Previous: Introduction

Overview of Cal.com Atoms

Next: Booker Atom

Embed booking functionality