Get started with Acuity's API quickly with an example in bash and PHP. Find your API credentials below or visit our integrations page.
Credentials
User ID: [[app:username]]
API Key: [[app:password]]
Example:
curl -u [[app:username]]:[[app:password]] https://acuityscheduling.com/api/v1/appointments.json
<?php
$userID = '[[app:username]]';
$key = '[[app:password]]';
// URL for all appointments (just an example):
$url = 'https://acuityscheduling.com/api/v1/appointments.json';
// Initiate curl:
// GET request, so no need to worry about setting post vars:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// Grab response as string:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// HTTP auth:
curl_setopt($ch, CURLOPT_USERPWD, "$userID:$key");
// Execute request:
$result = curl_exec($ch);
// Don't forget to close the connection!
curl_close($ch);
$data = json_decode($result, true);
print_r($data);
Authentication
Authenticate to the API over SSL with HTTP Basic Auth, using a username of your numeric User ID and password of your API Key. 401 Unauthorized will be returned on authentication failure.