Send an SMS Using Go

The TextMagic API Go wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you'll then be able to send text messages.

Get it now on GitHub
Go logo

Installation Instructions

Run the following command to install the TextMagic Go helper:

go get


The Go wrapper for the TextMagic API has no requirements other than the Go distribution.

Sending an SMS using Go (an example)

Below is an example on how to send a text message using Go:

package main
import (
  textmagic ""
func main() {
  client := textmagic.NewClient("<USERNAME>", "<APIV2_KEY>")
  params := map[string]string{
    "phones": "99900000",
    "text"  : "Hello from TextMagic Go",
  message, err := client.CreateMessage(params)
  if err != nil {
  } else {


If you need help with the wrapper, or if you have any suggestions for improvements and/or if you have any enquiries regarding the Go SMS API, please contact us by emailing .