Delphi Google Cloud SDK — FCM, Pub/Sub, Calendar & more
A coherent set of Pascal components for the Google Cloud platform: push mobile notifications with Firebase Cloud Messaging HTTP v1, pull / publish messages on Cloud Pub/Sub, schedule events on Google Calendar, sign service-account JWTs for any GCP service, and generate strongly-typed clients for any Google API from its discovery / OpenAPI document — all from sgcWebSockets.
No Python google-cloud bindings, no Java JDK, no Node.js bridge — just Delphi components that speak HTTPS, HTTP/2 and OAuth2 directly to Google’s endpoints.
Google Cloud Platform exposes hundreds of REST APIs — messaging, storage, queueing, identity, mapping, machine learning, productivity (Calendar, Drive, Gmail, Docs), advertising, analytics, billing and more. Until now, calling them from Delphi meant hand-writing JWT signers, OAuth2 token refreshers, multipart uploaders and SSE parsers. sgcWebSockets ships first-class components for the most common surfaces — TsgcHTTP_API_GoogleFCM for Firebase Cloud Messaging HTTP v1, TsgcHTTP_API_GoogleCloudPubSub for Cloud Pub/Sub, TsgcHTTP_API_GoogleCalendar for the Calendar API v3 — plus reusable OAuth2 + service-account-JWT infrastructure that drives every other Google endpoint and the sgcOpenAPI code generator for the long tail.
Authentication is uniform: a Google Cloud project, a service account JSON key (or an OAuth2 client for end-user flows), and the appropriate https://www.googleapis.com/auth/... scopes. The library’s JWT signer builds the assertion, requests an access token from oauth2.googleapis.com/token, and caches / refreshes it transparently. The same code runs unmodified on Windows, macOS, Linux, iOS and Android, with both VCL and FMX UI layers.
TsgcHTTP_API_GoogleFCM — send push notifications to Android, iOS and web clients with the modern OAuth2-based FCM HTTP v1 API. Topic / token / condition targeting, data payloads, image / sound / channel overrides.
TsgcHTTP_API_GoogleCalendar — list calendars, CRUD events, manage attendees, recurring rules, free/busy queries and ACLs — with OAuth2 user consent or service-account domain-wide delegation.
Google Cloud Storage
Upload / download objects, signed URLs, resumable uploads and bucket management via HTTPS — works with any GCS bucket and S3-compatible interop.
Google AI & Gemini
Native client for Gemini generative-language models, embeddings and Vertex AI — streaming over SSE, function calling, JSON-mode structured outputs.
Google Drive, Gmail, Sheets, Docs
Generated SDKs via sgcOpenAPI — OAuth2 + the appropriate Workspace scopes give you Pascal classes for every endpoint.
Google Maps Platform
Geocoding, directions, distance matrix, places and roads — HTTPS + API key or OAuth2.
sgcOpenAPI emits Pascal client classes for any Google REST API that publishes an OpenAPI document — Compute Engine, BigQuery, Cloud Functions, Cloud Run, Secret Manager and friends.
Authentication
OAuth2 + service-account JWT, server-side
Most Google Cloud APIs accept two forms of credential: a service-account JSON key (RS256-signed JWT exchanged at oauth2.googleapis.com/token for a short-lived bearer token, no user interaction) and an OAuth2 client with the standard authorisation-code or device-code flow for end-user data (Calendar, Drive, Gmail). sgcWebSockets covers both: TsgcJWTClient signs the assertion, TsgcOAuth2Client drives the user flow, and the per-service components consume whichever credential you wire in. Tokens are cached in memory and refreshed before expiry so your application code never touches a 401.
QuickStart
Send an FCM push from Delphi
A 25-line snippet that authenticates with a service-account JSON key and pushes a notification to a single device token.
Cloud Pub/Sub is Google’s globally distributed, at-least-once messaging fabric — the backbone of countless event-driven architectures. The same service account credential drives both ends; publishers POST messages to a topic, subscribers either pull on a schedule or accept push deliveries on an HTTPS endpoint.
Drop sgcWebSockets into your Delphi or C++Builder IDE — one package per Delphi version 7 through 13. Download the trial.
2. Create a service account
In the Google Cloud console, create a service account, grant it the right roles (e.g. Pub/Sub Publisher, Firebase Messaging Admin), and download the JSON key.
3. Drop a component
For FCM use TsgcHTTP_API_GoogleFCM, for Pub/Sub use TsgcHTTP_API_GoogleCloudPubSub, for Calendar use TsgcHTTP_API_GoogleCalendar — or generate a custom SDK with sgcOpenAPI.