Skip to content

SMS, Push & Real-Time — WhatsApp, FCM, SignalR

Granit.Notifications supports a wide range of delivery channels beyond email. Each channel is registered independently and resolved via Keyed Services. For provider configuration options, see the configuration reference.

| Provider | Package | Keyed Service key | |----------|---------|-------------------| | Azure Communication Services | Granit.Notifications.Sms.AzureCommunicationServices | "AzureCommunicationServices" | | AWS SNS | Granit.Notifications.Sms.AwsSns | "AwsSns" | | Twilio | Granit.Notifications.Twilio | "Twilio" | | Brevo | Granit.Notifications.Brevo | "Brevo" |

context.Services.AddGranitNotificationsSms(opts => opts.Provider = "Brevo");

| Provider | Package | Keyed Service key | |----------|---------|-------------------| | Brevo | Granit.Notifications.Brevo | "Brevo" | | Twilio | Granit.Notifications.Twilio | "Twilio" |

context.Services.AddGranitNotificationsWhatsApp(opts => opts.Provider = "Brevo");

| Provider | Package | Keyed Service key | |----------|---------|-------------------| | Firebase Cloud Messaging (FCM HTTP v1) | Granit.Notifications.MobilePush.GoogleFcm | "GoogleFcm" | | Azure Notification Hubs | Granit.Notifications.MobilePush.AzureNotificationHubs | "AzureNotificationHubs" | | AWS SNS Platform Application | Granit.Notifications.MobilePush.AwsSns | "AwsSns" |

context.Services.AddGranitNotificationsMobilePush(opts => opts.Provider = "GoogleFcm");
context.Services.AddGranitNotificationsMobilePushGoogleFcm();

Real-time notifications delivered via SignalR hub with optional Redis backplane for multi-instance deployments.

context.Services.AddGranitNotificationsSignalR(
context.Configuration.GetConnectionString("Redis")!);

Map the hub in your application:

context.App.MapHub<NotificationHub>("/hubs/notifications");

W3C Web Push (VAPID, RFC 8030/8291/8292) — no dependency on FCM or US cloud providers, European sovereignty by design.

context.Services.AddGranitNotificationsPush();

Native .NET 10 SSE channel with authentication, per-user connection limits, and bounded message buffers.

context.Services.AddGranitNotificationsSse();

The SSE channel requires authentication (.RequireAuthorization() on the route group) and enforces per-user connection limits to prevent resource exhaustion. When the limit is reached, the endpoint returns 429 Too Many Requests. Message buffers use bounded channels with DropOldest policy.

Zulip Bot API chat integration for team notifications.

context.Services.AddGranitNotificationsZulip();