Google Calendar
Create an OAuth app
Create a Google Cloud project
Go to console.cloud.google.com, create a new project (or select an existing one), and enable the Google Calendar API under APIs & Services → Library.
Configure the OAuth consent screen
Under APIs & Services → OAuth consent screen, set the app name, support email, and authorized domain. Add the following scopes:
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/calendar.events
Create OAuth credentials
Under APIs & Services → Credentials, click Create Credentials → OAuth client ID. Choose Web application.Add your callback URL as an Authorized redirect URI:Download the credentials JSON or copy the Client ID and Client Secret.
The redirect URI is derived automatically from
APP_URL in config/services.php. Make sure APP_URL matches the domain registered in your Google OAuth app exactly, including the scheme (https://).Callback URL
state parameter, and stores the access and refresh tokens against the Appointment Tool’s calendar record.
Microsoft Calendar (Outlook)
Register an Azure app
Create an app registration
Go to portal.azure.com and navigate to Azure Active Directory → App registrations → New registration.Set the name, and under Supported account types choose the appropriate option:
- Accounts in this organizational directory only — for single-tenant deployments
- Accounts in any organizational directory and personal Microsoft accounts — for multi-tenant or personal account support
Add API permissions
Under API permissions → Add a permission → Microsoft Graph, add the following Delegated permissions:
Calendars.ReadWriteoffline_accessUser.Read
Create a client secret
Under Certificates & secrets → New client secret, create a secret and copy its value immediately (it will not be shown again).
Callback URL
outlook.
Connecting a calendar to an Appointment Tool
Open an Appointment Tool
Navigate to Appointment Tools, then open the tool you want to connect a calendar to. Click Edit.
Select a provider
In the Calendar Connections section, click Connect Google Calendar or Connect Microsoft Calendar.Sniko calls the connection API (
POST /appointment-tools/{id}/calendar-connections/google/connect or .../microsoft/connect). If your OAuth credentials are not configured in .env, you will see an error prompting you to add them.Authorize access
You are redirected to the Google or Microsoft OAuth consent screen. Sign in and grant calendar access.
Sync direction
Each calendar connection has a configurable sync direction. Update it under the calendar connection settings:| Setting | Behavior |
|---|---|
both | Import events from the calendar and export new bookings to it (default) |
import_only | Read the calendar to determine availability; do not write new bookings back |
export_only | Write new bookings to the calendar; ignore existing calendar events for availability |
Webhook registration
Sniko registers push notification channels with Google and Microsoft so calendar changes are reflected in near real time without polling. These channels are renewed automatically before they expire. Inbound calendar webhook notifications are received at:| Provider | URL |
|---|---|
| Google Calendar | POST {APP_URL}/calendar/webhooks/google |
| Microsoft Calendar | POST {APP_URL}/calendar/webhooks/microsoft |
Manual sync
To trigger an immediate sync from the calendar to Sniko:events_imported, events_updated, and events_count.
Disconnecting a calendar
To disconnect a calendar, click Disconnect on the calendar connection or call:sync_enabled to false and the connection status to inactive. Existing bookings are not deleted, but the calendar will no longer sync. To reconnect, start the OAuth flow again.