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:
id
The appointment id if this is an appointment sidebar.calendarID
The calendar id if this is an appointment sidebar.first_name
The client's first name.last_name
The client's last name.email
The 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 less than a minute ago