☁️
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
  • Methods

Was this helpful?

  1. Classes

CalendlyApi

PreviousError HandlingNextOrganization

Last updated 4 years ago

Was this helpful?

Methods

createSchedulingLink()

  • Returns

// Create single use scheduling link

CalendlyApi.CreateSchedulingLinkRequest request = new CreateSchedulingLinkRequest();

request.owner = 'https://api.calendly.com/event_types/01234567890';
request.max_event_count = 1;
request.owner_type = 'EventType';

CalendlyApi.SchedulingLinkResource resource = CalendlyApi.createSchedulingLink(request);

createWebhookSubscription()

  • Returns

CalendlyApi.CreateWebhookSubscriptionRequest req = new CalendlyApi.CreateWebhookSubscriptionRequest();
List<String> events = new List<String>();

request.url = URL.getSalesforceBaseUrl().toExternalForm() + '/services/apexrest/fe92da7d';
request.organization = 'https://api.calendly.com/organizations/123456789';
request.user = 'https://api.calendly.com/users/123456789';
request.scope = 'organization';
request.events = new List<String> {
  'invitee.created',
  'invitee.canceled'
};

CalendlyApi.WebhookSubscriptionResource response = CalendlyApi.createWebhookSubscription(request);

getCurrentOrganization()

getCurrentUser()

getUser(String uuid)

getEventType(String eventTypeUUID)

CalendlyApi.EventTypeQueryParams params = new CalendlyApi.EventTypeQueryParams();
CalendlyApi.SortParam sortParam = new CalendlyApi.SortParam();
List<CalendlyApi.SortParam> sortParams = new List<CalendlyApi.SortParam>();
sortParam.name = 'name';
sortParam.order = 'asc';
sortParams.add(sortParam);

params.count = 10;
params.organization = 'https://api.calendly.com/organizations/123456789';
params.sort_params = sortParams;
params.user = 'https://api.calendly.com/users/123456789';

CalendlyApi.EventTypeCollection response = CalendlyApi.getEventTypes(params);

getInvitee(String eventUUID, String inviteeUUID)

getOrganizationMembership(String uuid)

getScheduledEvent(String uuid)

getWebhookSubscription(String uuid)

verifyWebhookSignature(String signature, String webhookSigningKey, String webhookPayload)

This method sets the webhook's tolerance zone to 5 minutes. Webhook messages sent over 5 minutes ago will be consided invalid.

verifyWebhookSignature(String signature, String webhookSigningKey, String webhookPayload, Long tolerance)

Returns

Returns

Returns

Returns

getEventTypes()

Returns

Returns

getInvitees(String eventUUID, )

Returns

getOrganizationInvitations(String organizationUUID, )

Returns

getOrganizationMemberships()

Returns

Returns

Returns

getScheduledEvents()

Returns

Returns

getWebhookSubscriptions()

Returns

Returns

See

The tolerance value is stored in milliseconds. For example, setting a tolerance value of 180000L (3 minutes) will cause the verifyWebookSignature method to reject any webhooks that were sent over 3 minutes ago. This feature allows you to prevent .

Returns

See

CreateSchedulingLinkRequest request
SchedulingLinkResource
CreateWebhookSubscriptionRequest request
WebhookSubscriptionResource
Organization
UserResource
UserResource
EventTypeResource
EventTypeQueryParams queryParams
EventTypeCollection
InviteeResource
InviteeQueryParams queryParams
InviteeCollection
OrganizationInvitationQueryParams queryParams
OrganizationInvitationCollection
OrganizationMembershipQueryParams queryParams
OrganizationMembershipCollection
OrganizationMembershipResource
ScheduledEventResource
ScheduledEventQueryParams queryParams
ScheduledEventCollection
WebhookSubscriptionResource
WebhookSubscriptionQueryParams queryParams
WebhookSubscriptionCollection
VerifyWebhookResult
Apex Controller example
replay attacks
VerifyWebhookResult
Apex Controller example