Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sfreiberg/gotwilio
Twilio library for Go (golang).
https://github.com/sfreiberg/gotwilio
sms twilio
Last synced: 3 months ago
JSON representation
Twilio library for Go (golang).
- Host: GitHub
- URL: https://github.com/sfreiberg/gotwilio
- Owner: sfreiberg
- License: bsd-2-clause
- Created: 2012-05-20T05:04:32.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T05:24:02.000Z (7 months ago)
- Last Synced: 2024-08-02T13:18:52.754Z (6 months ago)
- Topics: sms, twilio
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 341
- Watchers: 10
- Forks: 136
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-twilio-golang - sfreiberg/gotwilio
README
## Overview
This is the start of a library for [Twilio](http://www.twilio.com/). Gotwilio supports making voice calls and sending text messages.## License
Gotwilio is licensed under a BSD license.## Installation
To install gotwilio, simply run `go get github.com/sfreiberg/gotwilio`.## SMS Example
package main
import (
"github.com/sfreiberg/gotwilio"
)func main() {
accountSid := "ABC123..........ABC123"
authToken := "ABC123..........ABC123"
twilio := gotwilio.NewTwilioClient(accountSid, authToken)from := "+15555555555"
to := "+15555555555"
message := "Welcome to gotwilio!"
twilio.SendSMS(from, to, message, "", "")
}## MMS Example
package main
import (
"github.com/sfreiberg/gotwilio"
)func main() {
accountSid := "ABC123..........ABC123"
authToken := "ABC123..........ABC123"
twilio := gotwilio.NewTwilioClient(accountSid, authToken)from := "+15555555555"
to := "+15555555555"
message := "Welcome to gotwilio!"
mediaUrl := []string{"http://host/myimage.gif"}
twilio.SendMMS(from, to, message, mediaUrl, "", "")
}## Voice Example
package main
import (
"github.com/sfreiberg/gotwilio"
)func main() {
accountSid := "ABC123..........ABC123"
authToken := "ABC123..........ABC123"
twilio := gotwilio.NewTwilioClient(accountSid, authToken)from := "+15555555555"
to := "+15555555555"
callbackParams := gotwilio.NewCallbackParameters("http://example.com")
twilio.CallWithUrlCallbacks(from, to, callbackParams)
}## Video example
package main
import (
"github.com/sfreiberg/gotwilio"
)func main() {
accountSid := "ABC123..........ABC123"
authToken := "ABC123..........ABC123"
twilio := gotwilio.NewTwilioClient(accountSid, authToken)twilio.CreateVideoRoom(gotwilio.DefaultVideoRoomOptions)
}