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 GitHubInstallation Instructions
Run the following command to install the Textmagic Go helper:
go get github.com/textmagic/textmagic-rest-go
Requirements
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 ( "fmt" textmagic "github.com/textmagic/textmagic-rest-go" ) 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 { fmt.Println(err) } else { fmt.Println(message.Id) } }
Support
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 [email protected].