Repository navigation
feat: implement Sendchamp SMS provider (Nigeria) #55
Copy link
Copy link
Open
Description
Summary
Implement the Sendchamp SMS provider inside src/SmsBridge/Providers/Sendchamp/.
Sendchamp is a Nigeria-based communication API provider with SMS, WhatsApp, email, and voice APIs. This fills an additional Nigerian provider gap beyond Termii, SmartSMSSolutions, BulkSMSNigeria, and MultiTexter.
Official docs:
- Developer portal: https://developers.sendchamp.com/
- Guides: https://docs.sendchamp.com
- API reference: https://sendchamp.readme.io/reference
Files to create
src/SmsBridge/Providers/Sendchamp/SendchampSmsProvider.cssrc/SmsBridge/Providers/Sendchamp/SendchampSmsRequestMapper.cssrc/SmsBridge/Providers/Sendchamp/SendchampSmsResponseMapper.cssrc/SmsBridge/Options/SendchampOptions.cs- Register
UseSendchamp()insrc/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs - Add
HttpClientNames.Sendchampinsrc/SmsBridge/Internal/Http/HttpClientNames.cs - Add
SmsProviderType.Sendchampto the enum
Sendchamp API Details
- API docs are hosted through Sendchamp ReadMe and GitBook.
- Auth uses an API key/token in the request headers.
- SMS sending supports sender, recipient, and message body fields.
- Confirm the current base URL and send endpoint from the ReadMe API reference during implementation.
Options
public sealed class SendchampOptions
{
public required string ApiKey { get; init; }
public required string Sender { get; init; }
}Implementation Notes
- Re-check the current Sendchamp SMS endpoint immediately before implementation because the API reference is hosted in a dynamic ReadMe site.
- Keep Sendchamp isolated from other Nigerian providers; do not reuse Termii request/response models.
- Avoid logging the API key or raw authorization header.
- Map provider message id/reference fields to
SmsSendResult.ProviderMessageId.
Tests to add
tests/SmsBridge.ProviderTests/SendchampResponseMapperTests.cstests/SmsBridge.ProviderTests/SendchampProviderTests.cs
Acceptance Criteria
- Provider sends SMS using Sendchamp's current SMS API endpoint and
IHttpClientFactory - Provider authenticates with configured API key/token
- Request mapper emits sender, recipient, and message body
- Response mapper maps provider message id/reference to
SmsSendResult.ProviderMessageId - Provider maps Sendchamp errors to failed
SmsSendResult - Transient HTTP failures set
IsTransientFailure = true -
UseSendchamp()registers the provider in DI - All tests pass -
dotnet test -
dotnet buildhas 0 warnings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity