☁️
Calendly Salesforce SDK
  • Getting Started
  • Core Concepts
    • Pagination
    • Error Handling
  • Classes
    • CalendlyApi
      • Organization
        • OrganizationMembership
          • OrganizationMembershipCollection
          • OrganizationMembershipResource
          • OrganizationMembershipPagination
          • OrganizationMembershipQueryParams
        • OrganizationInvitation
          • OrganizationInvitationResource
          • OrganizationInvitationCollection
          • OrganizationInvitationPagination
          • OrganizationInvitationQueryParams
      • User
        • UserResource
      • Invitee
        • InviteeResource
        • InviteeCollection
        • InviteeQueryParams
        • InviteePagination
        • InviteeQuestionsAndAnswer
        • InviteeTracking
        • InviteeCancellation
        • InviteePayment
      • ScheduledEvent
        • ScheduledEventPagination
        • ScheduledEventQueryParams
        • ScheduledEventCollection
        • ScheduledEventResource
        • EventMembership
        • EventGuest
        • ScheduledEventLocation
        • InviteesCounter
      • EventType
        • EventTypePagination
        • EventTypeQueryParams
        • EventTypeCollection
        • EventTypeResource
        • EventTypeProfile
      • SchedulingLink
      • WebhookSubscription
        • WebhookSubscriptionQueryParams
        • WebhookSubscriptionResource
        • WebhookSubscriptionCollection
        • WebhookSubscriptionPagination
        • VerifyWebhookResult
        • WebhookPayload
        • CreateWebhookSubscriptionRequest
      • SortParam
  • Advanced Concepts
    • Create Apex controller to receive webhook payload
Powered by GitBook
On this page
  • Installation
  • Setup
  • Create Calendly Personal Access Token
  • Create Salesforce Named Credential
  • Test Connection

Was this helpful?

Getting Started

NextPagination

Last updated 4 years ago

Was this helpful?

Installation

The Calendly Salesforce SDK is available as an unmanaged package which can be installed by using one of the links below:

Setup

To allow the Calendly Salesforce SDK to access your Calendly data you'll need to create a new personal access token by visiting . Once you've created your personal access token you'll then need to register a in Salesforce to securely store your Calendly token.

Create Calendly Personal Access Token

Visit to create / copy your new personal access token (this will be used in the step below).

Create Salesforce Named Credential

Login to your Salesforce account and create a new Named Credential with the following attributes:

Label: Calendly Name: calendly_api URL: Identity Type: Named Principal Authentication Protocol: Password Authentication Username: user Password: YOUR_CALENDLY_PERSONAL_ACCESS_TOKEN Generate Authorization Header: Disabled Allow Merge Fields in HTTP Header: Enabled

Test Connection

Before clicking the "Execute" button to run your code, ensure that the Open Log checkbox option is enabled so that you can confirm the request was successful.


try {
    CalendlyApi.UserResource userResource = CalendlyApi.getCurrentUser();
    
    System.debug('Current User:');
    System.debug(userResource);
} catch (CalendlyApi.CalendlyApiException e) {
    System.debug('Error');
    System.debug(e.title); 
    System.debug(e.message); 
}

An Execution Log should appear after running the code above; select the Debug Only option to filter the logs.

If the request was successful then you should see the user data of the Calendly user who created the personal access token in the Apex execution log.

To ensure that the Calendly Salesforce SDK has access to your Calendly data you can test the connect by executing the Apex code below from your .

Salesforce developer console
Production Package Link
Sandbox Package Link
https://calendly.com/integrations/api_webhooks
Named Credential
https://calendly.com/integrations/api_webhooks
https://api.calendly.com