Skip to main content

Unified SMS sending for Go

One Provider interface for Twilio, AWS SNS, Vonage, and MSG91 — each behind its own Go module, so you only pull in the dependencies for the providers you actually use.

go get github.com/KARTIKrocks/gosms

Unified Provider Interface

One Send / SendBulk / GetStatus contract across every backend

Multi-Module

Each provider is its own Go module — pull in only the dependencies you use

Zero Deps in Core

The root module has no third-party dependencies at all

Message Builder

Fluent API for scheduling, validity, references, and metadata

Multi-Provider

Fallback and round-robin strategies across multiple backends

Delivery Tracking

Status polling plus webhook parsing for Twilio, Vonage, and MSG91

Phone Utilities

E.164 validation, normalization, and GSM/UCS-2 segment counting

OTP Flow

Send / verify / resend via the optional OTPProvider capability

Mock Provider

In-memory provider with failure injection for tests

Why gosms?

Every provider ships its own SDK with its own request shape, its own error strings, and its own webhook format. gosms gives you one interface, one error set, and one webhook-parsing convention — and keeps each provider in its own module so switching (or supporting more than one) doesn't drag in dependencies you don't need.

CapabilitygosmsProvider SDK directly
One interface across Twilio, SNS, Vonage, and MSG91IncludedYou build it
Only pull the dependencies for providers you useIncludedYou build it
Delivery status polling + webhook parsingIncludedYou build it
Fallback and round-robin across providersIncludedYou build it
E.164 validation, normalization, segment countingIncludedYou build it
DLT template variables and OTP flow (MSG91)IncludedYou build it
Mock provider with failure/latency injectionIncludedYou build it

Supported providers

Install only the ones you need — go get github.com/KARTIKrocks/gosms/{provider}.

Twilio

Global SMS, scheduled sends, webhook status

AWS SNS

Transactional/promotional SMS, opt-out management

Vonage

Global SMS with webhook delivery receipts

MSG91

India DLT Flow templates, server-side OTP