Skip to content

seven-io/beehive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Send SMS message(s) to phone number(s).

Installation

  1. Fetch the package by running go get github.com/seven-io/beehive
  2. Add "github.com/seven-io/beehive" to import in hives.go
  3. Download module dependencies by running go mod download
  4. Recompile the binary by running make

Configuration

{
  "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.

Actions

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}}"
        }
      ]
    }
  ]
}
Support

Need help? Feel free to contact us.

MIT