net3000.twilio
1.0.0
dotnet add package net3000.twilio --version 1.0.0
NuGet\Install-Package net3000.twilio -Version 1.0.0
<PackageReference Include="net3000.twilio" Version="1.0.0" />
<PackageVersion Include="net3000.twilio" Version="1.0.0" />
<PackageReference Include="net3000.twilio" />
paket add net3000.twilio --version 1.0.0
#r "nuget: net3000.twilio, 1.0.0"
#:package net3000.twilio@1.0.0
#addin nuget:?package=net3000.twilio&version=1.0.0
#tool nuget:?package=net3000.twilio&version=1.0.0
Net3000.Twilio
Overview
The Net3000.Twilio library provides comprehensive integration with the Twilio platform for Net3000 solutions. This library enables SMS messaging, phone verification, and communication services using Twilio's robust messaging and verification APIs.
Features
- SMS Messaging: Send SMS messages with text and media content
- Phone Verification: Send and verify phone number verification codes
- Multi-Channel Support: Support for SMS, voice calls, email, WhatsApp, and SNA verification
- Media Messages: Send SMS messages with image attachments
- Verification Management: Complete phone verification workflow
- Error Handling: Comprehensive error handling and response management
Installation
dotnet add package net3000.twilio
Dependencies
net3000.common(v9.0.11)net3000.common.models(v1.0.7)Twilio(v7.13.1)Microsoft.Extensions.Configuration.Json(v9.0.9)
Configuration
Add your Twilio credentials to your configuration:
{
"Twilio": {
"account": "your-twilio-account-sid",
"token": "your-twilio-auth-token",
"from": "+1234567890",
"serviceid": "your-verify-service-sid"
}
}
Usage
Basic Setup
using net3000.TwilioApi;
// Initialize the service
var twilioService = new Lib(configuration);
Sending SMS Messages
// Send a simple SMS message
var result = twilioService.sendMessage(
body: "Hello from Net3000!",
to: "+1234567890"
);
// Send SMS with media attachment
var result = twilioService.sendMessage(
body: "Check out this image!",
to: "+1234567890",
mediaUrl: "https://example.com/image.jpg"
);
Phone Verification
// Request verification code
var verificationResult = twilioService.requestPhoneVerificationCode(
phone: "+1234567890",
channel: VerificationChannel.sms
);
// Verify the code
var verificationCheck = twilioService.verifyPhone(
phone: "+1234567890",
code: "123456"
);
API Reference
Lib (Main Service Class)
Main service class for Twilio API integration.
Methods
sendMessage(string body, string to)- Send SMS messagesendMessage(string body, string to, string mediaUrl)- Send SMS with mediarequestPhoneVerificationCode(string phone, VerificationChannel channel)- Request verification codeverifyPhone(string phone, string code)- Verify phone number with code
VerificationChannel Enum
sms- SMS verificationcall- Voice call verificationemail- Email verificationwhatsapp- WhatsApp verificationsna- Silent Network Authentication
Response Handling
All methods return apiResponse objects with:
success- Boolean indicating success/failuremessage- Response messagetitle- Response titlecssClass- CSS class for UI styling
Error Handling
The library provides comprehensive error handling with detailed error messages from the Twilio API. All methods include try-catch blocks and return standardized response objects.
Rate Limiting
The library respects Twilio API rate limits and includes proper error handling for rate limit exceeded responses.
Phone Number Format
- Use E.164 format for phone numbers (e.g., +1234567890)
- International numbers must include country code
- Remove any spaces, dashes, or parentheses
Testing
Use Twilio's test environment for development:
- Test Account SID and Auth Token from Twilio Console
- Test phone numbers: +15005550006 (valid), +15005550001 (invalid)
- Test verification codes: 123456 (valid), 000000 (invalid)
Security Considerations
- Store Twilio credentials securely in configuration
- Use environment variables for production deployments
- Implement proper access controls for verification endpoints
- Log verification attempts for audit purposes
License
This library is proprietary to Net3000. Usage is restricted to Net3000.ca solutions and authorized affiliates. Redistribution, sublicensing, or integration with third-party products outside the Net3000 ecosystem is prohibited without written consent from Net3000.
Support
For support and questions, contact the Net3000 development team or visit net3000.ca.
Changelog
v1.0.0
- Initial release with SMS messaging capabilities
- Phone verification with multi-channel support
- Media message support for images
- Comprehensive error handling and response management
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Microsoft.Extensions.Configuration.Json (>= 9.0.9)
- net3000.common (>= 9.0.11)
- net3000.common.models (>= 1.0.7)
- Twilio (>= 7.13.1)
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 |
|---|---|---|
| 1.0.0 | 99 | 10/4/2025 |
Initial release of Net3000 Twilio library with SMS messaging and phone verification capabilities.