How to sync third party apps with a self-hosted instance

  1. Add the required variables in your .env file

      1. You can generate this by running openssl rand -base64 32. This is required when sending 3rd party app credentials from your platform to your instance of
    2. On your self-hosted instance of visit settings/admin/apps under an admin account. Here you can enable/disable apps on and set the app keys (client id, client secret, etc.). These keys should match the ones on your platform.
      1. The header name is expected to contain the webhook secret. The default is calcom-webhook-secret
      1. The endpoint on your platform that your instance of will make a request to if the 3rd party app credentials are expired.
      1. When sending 3rd party app credentials between your platform and your instance, we expect these to be encrypted using AES256. When you encrypt the 3rd party app credentials, ensure the same key is used.
  2. When a user adds a 3rd party app on your platform, you should send the credentials that are created to your instance of to ${CALCOM_WEBAPP_URL}/api/webhook/app-credential . The payload should contain the following

      // UserId of the user
      userId: number;
      // The app slug that is on 
      // Can be found in the database in the App table
      appSlug: string;
      // The credentials from the 3rd party app. (ex. Access token, refresh token).
      // Ideally it should contain the access token and expiry date
      keys: string;
  3. When needs to refresh the app credentials it will make a request to CALCOM_CREDENTIAL_SYNC_ENDPOINT. The request contains the following.

      calcomUserId: string;
      // App slug on
      appSlug: string;

This only works if you have integrated into your platform. Users must consent to give access to your platform, and you are simply using's code within your platform.

Was this page helpful?