Send SMS message(s) to phone number(s).
- Fetch the package by running
go get github.com/seven-io/beehive
- Add
"github.com/seven-io/beehive"
toimport
inhives.go
- Download module dependencies by running
go mod download
- Recompile the binary by running
make
{
"Bees": [
{
"Name": "seven SMS Example Bee",
"Class": "sevenbee",
"Description": "A bee to demonstrate seven with Beehive",
"Options": [
{
"Name": "api_key",
"Value": "YOUR_SEVEN_API_KEY"
},
{
"Name": "from",
"Value": "+490123456789"
},
{
"Name": "to",
"Value": "+490123456789,+456789012345"
}
]
}
]
}
api_key: seven API key. Sign up and get one for free from seven.
from: Sender number. It may contain a maximum of 11 alphanumeric or 16 numeric characters.
to_number: Recipient number – possible are numbers and address book entries (groups and contacts). Multiple recipients can be specified separated by commas.
sms: Send SMS message(s). Needs the text of the message to send. You can use interpolation to send somthing from the event received:
{
"Actions": [
{
"Bee": "seven SMS Example Bee",
"Name": "sms",
"Options": [
{
"Name": "text",
"Type": "string",
"Value": "The current time is {{.timestamp}}"
}
]
}
]
}
Need help? Feel free to contact us.