Repository navigation
feat: implement Telesign SMS provider (US / Global) #54
Copy link
Copy link
Open
Description
Summary
Implement the Telesign SMS provider inside src/SmsBridge/Providers/Telesign/.
Telesign is a US/global identity and communications provider with SMS messaging APIs. This adds another established US/global provider for verification and transactional messaging use cases.
Official docs:
- Developer docs: https://developer.telesign.com/
- Enterprise SMS docs: https://developer.telesign.com/enterprise
Files to create
src/SmsBridge/Providers/Telesign/TelesignSmsProvider.cssrc/SmsBridge/Providers/Telesign/TelesignSmsRequestMapper.cssrc/SmsBridge/Providers/Telesign/TelesignSmsResponseMapper.cssrc/SmsBridge/Options/TelesignOptions.cs- Register
UseTelesign()insrc/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs - Add
HttpClientNames.Telesigninsrc/SmsBridge/Internal/Http/HttpClientNames.cs - Add
SmsProviderType.Telesignto the enum
Telesign API Details
- Messaging endpoint commonly documented as:
POST https://rest-ww.telesign.com/v1/messaging - Auth: Customer ID plus API key using Telesign request signing
- Request fields commonly include:
phone_number=15557654321 message=Hello from SMSBridge message_type=ARN - Response includes a provider reference id and status/error details.
Options
public sealed class TelesignOptions
{
public required string CustomerId { get; init; }
public required string ApiKey { get; init; }
public string MessageType { get; init; } = "ARN";
}Implementation Notes
- Confirm the current Telesign signing requirements during implementation; their docs are hosted behind a dynamic ReadMe site and the exact endpoint page should be rechecked before coding.
- Keep the request signing helper private to the Telesign provider unless another provider needs the same scheme.
- Map the provider reference id to
SmsSendResult.ProviderMessageId. - Map Telesign status/error payloads into SMSBridge success/failure semantics.
Tests to add
tests/SmsBridge.ProviderTests/TelesignResponseMapperTests.cstests/SmsBridge.ProviderTests/TelesignProviderTests.cs- Unit tests for Telesign request signing
Acceptance Criteria
- Provider signs Telesign requests using
CustomerIdandApiKey - Provider sends via the current Telesign SMS/messaging endpoint using
IHttpClientFactory - Request mapper emits
phone_number,message, andmessage_type - Response mapper maps provider reference id to
SmsSendResult.ProviderMessageId - Provider maps Telesign status/error responses to failed
SmsSendResult - Transient HTTP failures set
IsTransientFailure = true -
UseTelesign()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