Skip to content

feat: implement seven.io (sms77) SMS provider (Germany / Europe) #27

Open

Description

@teesofttech

Summary

Implement the seven.io (formerly sms77) SMS provider inside src/SmsBridge/Providers/SevenIo/.

seven.io is a German SMS gateway with strong coverage in Germany and the DACH region (Germany, Austria, Switzerland), and global reach.

Files to create

  • src/SmsBridge/Providers/SevenIo/SevenIoSmsProvider.cs
  • src/SmsBridge/Providers/SevenIo/SevenIoSmsRequestMapper.cs
  • src/SmsBridge/Providers/SevenIo/SevenIoSmsResponseMapper.cs
  • src/SmsBridge/Options/SevenIoOptions.cs
  • Register UseSevenIo() in src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs
  • Add HttpClientNames.SevenIo in src/SmsBridge/Internal/Http/HttpClientNames.cs
  • Add SmsProviderType.SevenIo to the enum

seven.io API Details

  • Endpoint: https://gateway.seven.io/api/sms
  • Auth: X-Api-Key header
  • Request (form-encoded or JSON):
    { "to": "...", "from": "...", "text": "..." }
  • Response: plain text 100 on success, or an error code on failure
    • 100 = sent successfully
    • 900 = auth error (permanent)
    • 600 = carrier error (transient)

Note: The response is a plain text status code, not JSON. Parse it directly.

Options

public sealed class SevenIoOptions
{
    public required string ApiKey { get; init; }
    public required string From { get; init; }
}

Tests to add

  • tests/SmsBridge.ProviderTests/SevenIoResponseMapperTests.cs
  • tests/SmsBridge.ProviderTests/SevenIoProviderTests.cs

Acceptance Criteria

  • Provider sends via seven.io REST API using IHttpClientFactory
  • Response mapper parses plain-text status code — 100 = success
  • Error code 600 sets IsTransientFailure = true; 900 sets false
  • UseSevenIo() registers the provider in DI
  • All tests pass — dotnet test
  • dotnet build has 0 warnings

Activity

  1. Francescolis commented on Jun 16, 2026

    @Francescolis

    Hello, this is an excellent library.

    A quick question: why not allow developers to implement their own providers, similar to how HttpClient works today?

    This would make it easier to extend the library without modifying the code.

  2. teesofttech commented on Jun 19, 2026

    @teesofttech
    OwnerAuthor

    Hello, this is an excellent library.

    A quick question: why not allow developers to implement their own providers, similar to how HttpClient works today?

    This would make it easier to extend the library without modifying the code.

    Thank you for the comment.
    I would prefer to leave it like this for now.
    I will add an issue to further update it to allow developers to implement their own providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions