Sparc.Blossom.Realtime.Twilio
10.0.0
dotnet add package Sparc.Blossom.Realtime.Twilio --version 10.0.0
NuGet\Install-Package Sparc.Blossom.Realtime.Twilio -Version 10.0.0
<PackageReference Include="Sparc.Blossom.Realtime.Twilio" Version="10.0.0" />
<PackageVersion Include="Sparc.Blossom.Realtime.Twilio" Version="10.0.0" />
<PackageReference Include="Sparc.Blossom.Realtime.Twilio" />
paket add Sparc.Blossom.Realtime.Twilio --version 10.0.0
#r "nuget: Sparc.Blossom.Realtime.Twilio, 10.0.0"
#:package Sparc.Blossom.Realtime.Twilio@10.0.0
#addin nuget:?package=Sparc.Blossom.Realtime.Twilio&version=10.0.0
#tool nuget:?package=Sparc.Blossom.Realtime.Twilio&version=10.0.0
Sparc.Notifications.Twilio
The Sparc.Notifications.Twilio plugin is a plugin that enables low-configuration email and SMS notifications in your application, using Twilio as the provider.
Get Started with Sparc.Notifications.Twilio
In Your Features Project:
Add the following settings to your
appsettings.jsonfile:{ "Twilio": { "AccountSid": "", // the SID from your Twilio account "AuthToken": "", // the secret Auth Token from your Twilio account (preferably store this in usersecrets.json) "FromPhoneNumber": "+1555121212", // the configured Twilio Phone Number to send SMSs "FromEmailAddress": "info@myapp.com", // the email address all emails will come from "FromName": "My App", // the From name for all outbound emails "SendGridApiKey": "", // the SendGrid API key from your Twilio / Sendgrid account }Add the following line of code to your
Startup.csfile to register theSparc.Notifications.Twilioplugin. It will automatically read the configuration from theTwiliosection of yourappsettings.jsonfile.services.AddTwilio(Configuration);Inject
TwilioServiceinto any feature that needs to send emails or SMS messages. For example:public class SendRegistrationNotification : Feature<bool> { IRepository<User> Users { get; set; } TwilioService Twilio { get; set; } public SendRegistrationNotification(IRepository<User> users, TwilioService twilio) { Users = users; Twilio = twilio; } public override async Task<bool> ExecuteAsync() { var user = await Users.FindAsync(User.Id()); var message = "You have successfully registered!"; if (user.PhoneNumber != null) await Twilio.SendSmsAsync(user.PhoneNumber, message); else await Twilio.SendEmailAsync(user.Email, message); // or simply call Twilio.SendAsync and pass in either an email or phone number, and the plugin will send an SMS or email accordingly await Twilio.SendAsync(user.PhoneNumber ?? user.Email, message); return true; } }
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- libphonenumber-csharp (>= 9.0.18)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- SendGrid (>= 9.29.3)
- SendGrid.Extensions.DependencyInjection (>= 1.0.1)
- Twilio (>= 7.13.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 400 | 11/11/2025 |
| 7.1.0 | 340 | 5/10/2023 |
| 7.1.0-pre.1 | 299 | 12/13/2022 |