> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up Calendly OAuth App

> Complete guide to creating and configuring a Calendly OAuth application

## Prerequisites

* Calendly account (personal or business)
* Access to Calendly Developer Portal

## Step 1: Create Calendly Developer Account

1. Visit [https://developer.calendly.com/](https://developer.calendly.com/)
2. Click **"Sign In"** or **"Log In"** if you already have an account
3. Sign in with your Calendly account or create a new developer account

![Calendly Developer Login](https://mintcdn.com/klavisai/2FN45VVIW760Qvl2/images/knowledge-base/calendly_oauth_app/calendly_step1_login.png?fit=max\&auto=format\&n=2FN45VVIW760Qvl2\&q=85\&s=e7d32a480ccc011ea8377cfe7af9138f)

## Step 2: Create a New App

1. Once logged in, go to **"Accounts"** -> **"My Apps"**
2. Click **"Create a new app"**
3. Choose **"Web App"** as the integration type
4. Fill in the app details:
   * **Name of app**: Your application name (e.g., your brand name)
   * **Kind of app**: Web/Native (depending on your need)
   * **Environment Type**: Sandbox/Production (**Production** recommended)
   * **Redirect URIs**: Add your callback URL:
     * `https://api.klavis.ai/oauth/calendly/callback`

![Calendly App Creation Form](https://mintcdn.com/klavisai/2FN45VVIW760Qvl2/images/knowledge-base/calendly_oauth_app/calendly_step2_create_app.png?fit=max\&auto=format\&n=2FN45VVIW760Qvl2\&q=85\&s=662cd2a97d703ee8e641ed06e43b6608)

> [!NOTE]
>
> Normally, the redirect URI should be set to: `https://api.klavis.ai/oauth/calendly/callback`

## Step 3: Get Your Credentials

After creating the app, you'll see:

* **Client ID**: Copy this value
* **Client Secret**: Generate and copy this value (keep it secure!)

![Get the Credentials](https://mintcdn.com/klavisai/2FN45VVIW760Qvl2/images/knowledge-base/calendly_oauth_app/calendly_step3_client_id_and_secret.png?fit=max\&auto=format\&n=2FN45VVIW760Qvl2\&q=85\&s=96f8961223cf4437d9942f8367ab26ac)

> [!NOTE]
>
> Calendly does not use traditional OAuth scopes. Once authenticated, your application has access to all API endpoints permitted by the user's subscription and role.

## (Optional) Step 4: White Labeling

> [!NOTE]
>
> White labeling allows you to customize the OAuth experience with your own branding instead of Klavis AI's.

If you want to use your own Calendly OAuth application with custom branding:

1. **Configure White Labeling**: Go to [https://www.klavis.ai/home/white-label](https://www.klavis.ai/home/white-label)
2. **Add Your Credentials**: Enter your Calendly **Client ID** and **Client Secret** from Step 3
3. **Set Redirect URI**: Use `https://api.klavis.ai/oauth/calendly/callback` or your custom callback URL
4. **Initiate OAuth**: Use your client ID when starting the OAuth flow:

   ```javascript without SDK theme={null}
   // Example: Initiating Calendly OAuth with white-label
   const authUrl = `https://api.klavis.ai/oauth/calendly/authorize?instance_id=${instanceId}&client_id=${yourClientId}`;
   window.location.href = authUrl;
   ```

   ```typescript TypeScript SDK theme={null}
   import { Klavis } from "@klavis/sdk";

   const klavis = new Klavis({
     apiKey: "YOUR_API_KEY"
   });

   // Example: Initiating Calendly OAuth with white-label
   const oauthUrl = await klavis.mcpServer.getOAuthUrl({
     serverName: Klavis.McpServerName.Calendly,
     instanceId: instanceId,
     clientId: yourClientId,
     // redirectUri: YOUR_REDIRECT_URI,
     // scope: "YOUR_SCOPES", 
   });

   window.location.href = oauthUrl;
   ```

   ```python Python SDK theme={null}
   import webbrowser
   from klavis import Klavis
   from klavis.types import McpServerName

   klavis = Klavis(api_key="YOUR_API_KEY")

   # Example: Initiating Calendly OAuth with white-label
   oauth_url = klavis.mcp_server.get_oauth_url(
       server_name=McpServerName.CALENDLY,
       instance_id=instance_id,
       client_id=your_client_id,
       # redirect_uri="YOUR_REDIRECT_URI",
       # scope="YOUR_SCOPES"
   )

   # Open OAuth URL in user's default browser
   webbrowser.open(oauth_url)
   ```

> [!TIP]
>
> For detailed white labeling implementation and code examples, see our [OAuth & White Labeling guide](https://www.klavis.ai/docs/auth/white-label.md).

## Resources

* [Calendly Developer Documentation](https://developer.calendly.com/getting-started)
* [Calendly OAuth 2.0 Authentication Guide](https://developer.calendly.com/create-a-developer-account)
* [Klavis OAuth & White Labeling Guide](https://www.klavis.ai/docs/auth/white-label.md)
* [Klavis White Label Dashboard](https://www.klavis.ai/home/white-label)
* [Calendly API Reference](https://developer.calendly.com/getting-started#access-requirements)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.