> Calendly developer docs. For page Markdown, append .md to any URL.
> Index: https://developer.calendly.com/llms.txt
> API catalog: https://developer.calendly.com/.well-known/api-catalog
> OpenAPI: https://developer.calendly.com/openapi/calendly-api.yaml
> OAuth authorization server: https://calendly.com/.well-known/oauth-authorization-server
> MCP protected resource: https://mcp.calendly.com/.well-known/oauth-protected-resource
> Scheduling MCP endpoint: https://mcp.calendly.com
> Docs search MCP: https://developer.calendly.com/_mcp/server

# Creating an OAuth App

Use Calendly's API v2 to authenticate your app's users with OAuth and access Calendly data on their behalf. To get started, follow the steps below.

1. [Create a Calendly developer account](/docs/authentication/create-a-developer-account) to get started.

2. To initiate the OAuth authorization flow, use your application's `client_id` and redirect your user to the [Get Authorization Code](/api-docs/calendly-o-auth/o-auth/get-oauth-authorize) endpoint. Once the Calendly user grants access, their browser is redirected to your application's specified `redirect_uri` and the Authorization Code is passed inside the `code` query parameter.

   **Notes:**

   * This URL must be requested using a web browser.
   * The authorization code expires after 10 minutes.

   **Example Request URL:**

   ```
   https://auth.calendly.com/oauth/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=https://my.site.com/auth/calendly
   ```

   **Example Redirect URL:**

   ```
   https://my.site.com/auth/calendly?code=f04281d639d8248435378b0365de7bd1f53bf452eda187d5f1e07ae7f04546d6
   ```

3. To retrieve the access token, make a POST request to [Get Access Token](/api-docs/calendly-o-auth/o-auth/post-oauth-refresh-token) endpoint. Use it to access Calendly resources on behalf of an authenticated user.

   **Note:**

   * Access tokens expire after 2 hours.
   * Use a refresh token to get a new access token.
     * Refresh tokens don't expire until they are used.

4. To test the access token, make a call to the [Get current user](/api-docs/calendly-api/users/get-current-user) endpoint.