SDKs
Official MsGine libraries for Node.js and TypeScript, Python and Go. They cover the whole developer API: SMS, WhatsApp, email, push notifications, webhooks, workflows, events, opt-outs, contact fields and analytics.
| Language | Package | Requires |
|---|---|---|
| Node.js / TypeScript | @msgine/sdk | Node.js 18.17+ |
| Python | msgine | Python 3.10+ |
| Go | github.com/kasimlyee/msgine-sdk/go | Go 1.21+ |
The source for all three is in one repository: github.com/kasimlyee/msgine-sdk.
Install
bash
npm install @msgine/sdkbash
pip install msginebash
go get github.com/kasimlyee/msgine-sdk/goWhat the SDKs handle for you
- Retries that never send twice. Rate limits, server errors and network failures are retried with backoff. Every send carries an idempotency key that stays the same across attempts, so a retried request cannot deliver or charge a message twice.
- Request signing. When your API key has signing turned on, every request is signed with your signing secret.
- Webhook verification. One function checks the
X-MsGine-Signatureheader in constant time and refuses deliveries older than five minutes. - One error type with the HTTP status, a stable
code, the message and field details. - One list shape for every history:
items,total,page,pages.
The Node.js package has no dependencies. The Python package depends only on httpx. The Go module uses only the standard library.
Keep your key on the server
An API key can send messages and spend your balance. Use the SDKs from your backend, never from a browser or a mobile app. For push notifications, your app sends its device token to your backend, and your backend registers it with MsGine.
Next
- Quick start: your first message in a few lines.
- Configuration: options, sandbox keys and request signing.
- All methods: every call in every language.