Cal Provider

Archived Cal.com Atoms documentation for Cal Provider. These deprecated SDK components are no longer maintained.

Cal Provider is used to setup scheduling within your app. It is used in the root of your app, be it _app.js or or _app.tsx in case of Next.js or App.js or App.ts in case of React. Here is an example:

import "@calcom/atoms/globals.min.css";
import { CalProvider } from '@calcom/atoms';

function MyApp({ Component, pageProps }) {
  const accessToken = "managed-user-access-token";

  return (
    <CalProvider
      clientId={process.env.CAL_OAUTH_CLIENT_ID ?? ""}
      options={{
        apiUrl: process.env.CAL_API_URL ?? "https://api.cal.com/v2",
        refreshUrl: process.env.REFRESH_URL
      }}
      accessToken={accessToken}
    >
      <Component {...pageProps} />
    </CalProvider>
  );
}

export default MyApp;

Below is a list of props that can be passed to the Cal Provider.


Last updated