CalendlyApi

Methods

// 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(CreateWebhookSubscriptionRequest request)

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)

getInvitee(String eventUUID, String inviteeUUID)

getInvitees(String eventUUID, InviteeQueryParams queryParams)

getOrganizationInvitations(String organizationUUID, OrganizationInvitationQueryParams queryParams)

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)

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 replay attacks.

Last updated

Was this helpful?