Repository navigation
feat: implement Arkesel SMS provider (Ghana / West Africa) #57
Copy link
Copy link
Open
Description
Summary
Implement the Arkesel SMS provider inside src/SmsBridge/Providers/Arkesel/.
Arkesel is a Ghana/West Africa communication provider with OpenAPI documentation for SMS V1, SMS V2, Voice, OTP, USSD, and related APIs. This adds a strong West African provider option beyond Hubtel.
Official docs:
- Developer docs: https://developers.arkesel.com/
- OpenAPI spec: https://developers.arkesel.com/spec/api_spec.v2.3.1.yaml
Files to create
src/SmsBridge/Providers/Arkesel/ArkeselSmsProvider.cssrc/SmsBridge/Providers/Arkesel/ArkeselSmsRequestMapper.cssrc/SmsBridge/Providers/Arkesel/ArkeselSmsResponseMapper.cssrc/SmsBridge/Options/ArkeselOptions.cs- Register
UseArkesel()insrc/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs - Add
HttpClientNames.Arkeselinsrc/SmsBridge/Internal/Http/HttpClientNames.cs - Add
SmsProviderType.Arkeselto the enum
Arkesel API Details
- Base URL:
https://sms.arkesel.com - SMS V1 send endpoint:
GET /sms/api?action=send-sms - SMS V1 auth:
api_keyquery parameter - SMS V1 request fields include
api_key,to,from,sms, and optionaluse_casefor Nigerian contacts - SMS V2 uses API key in a header; prefer SMS V2 if its send endpoint is stable and straightforward in the OpenAPI spec
- Response/status docs include:
- V1 success:
OK - V1 errors:
100,101,102,103,104,105,106,109,111 - V2 success:
200 - V2 errors:
401,402,403,422,500
- V1 success:
Options
public sealed class ArkeselOptions
{
public required string ApiKey { get; init; }
public required string Sender { get; init; }
public string? UseCase { get; init; }
public bool UseSmsV2 { get; init; } = true;
}Implementation Notes
- Prefer SMS V2 if the send endpoint is confirmed from the spec; otherwise implement V1 first because it is explicitly documented.
- Add
use_casesupport for Nigerian contacts when configured. - Map accepted response details to
SmsSendResult.ProviderMessageIdwhere available; otherwise map success without a provider id. - Map documented status codes to SMSBridge failure semantics.
Tests to add
tests/SmsBridge.ProviderTests/ArkeselResponseMapperTests.cstests/SmsBridge.ProviderTests/ArkeselProviderTests.cs
Acceptance Criteria
- Provider sends SMS through Arkesel using
IHttpClientFactory - Provider supports configured sender and optional
use_case - Provider authenticates with configured API key
- Response mapper handles documented V1/V2 success and error codes
- Provider maps Arkesel API failures to failed
SmsSendResult - Transient HTTP failures set
IsTransientFailure = true -
UseArkesel()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