Custom Sidebar
Include custom information in the appointment sidebar.
Use the Custom Sidebar integration to include custom HTML in the appointment details for logged in admins who are viewing appointments by filling out the "HTML Content" field. You can use these variables to dynamically fill in your code:
%id%the unique ID for the appointment.%first%the client's first name.%last%the client's last name.%email%the client's email.
Callback
Custom sidebar content can also be generated by your own server. Just point the callback URL to your server, and we'll display the content you respond with.
When you view an appointment in Acuity, we'll send a POST request to the callback with application/x-www-form-urlencoded content containing the following parameters:
idThe appointment id if this is an appointment sidebar.calendarIDThe calendar id if this is an appointment sidebar.first_nameThe client's first name.last_nameThe client's last name.emailThe client's email.
Verifying Custom Sidebar Requests
Custom sidebar requests are signed by Acuity using your API key, so you can verify that a request is from Acuity. First compute the base64 HMAC-SHA256 signature using the request's body as the message and your API key as the shared secret. Then compare this signature to the request header X-Acuity-Signature . If they match, the request is authentic.
<?php
AcuityScheduling::verifyMessageSignature($apiKey);var Acuity = require('acuityscheduling');
// Direct verification of message body:
Acuity.verifyMessageSignature(secret, body, signature);
// Example middle-ware using body-parser:
var verifyMiddleware = bodyParser.urlencoded({
verify: Acuity.bodyParserVerify(secret)
});Updated 5 months ago
