Twilio
Simple Twilio API wrapper in Go.
Usage
As usual you can go get
the twilio package by issuing:
$ go get github.com/subosito/twilio
Then you can use it on your application:
package main
import (
"fmt"
"github.com/subosito/twilio"
)
func main() {
AccountSid := "ac650108548e09aC2eed18ddb850c20b9"
AuthToken := "2ecaf74387cbb28456aad6fb57b5ad682"
from := "+15005550006"
to := "+62801234567"
callbackUrl := "http://subosito.com/"
t := twilio.NewTwilio(AccountSid, AuthToken)
params := twilio.SMSParams{StatusCallback: callbackUrl}
s, err := t.SendSMS(from, to, "Hello Go!", params)
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("%+v\n", s)
return
}
Resources
Documentation: http://godoc.org/github.com/subosito/twilio