{"id":16095542,"url":"https://github.com/meowgorithm/baby-twilio","last_synced_at":"2025-07-16T19:36:02.046Z","repository":{"id":57497782,"uuid":"135239744","full_name":"meowgorithm/baby-twilio","owner":"meowgorithm","description":"A simple Go Twilio package, for babies","archived":false,"fork":false,"pushed_at":"2019-12-18T01:12:28.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T20:13:50.200Z","etag":null,"topics":["go","sms","twilio"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meowgorithm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-29T04:08:02.000Z","updated_at":"2020-08-30T15:58:45.000Z","dependencies_parsed_at":"2022-08-28T16:11:13.468Z","dependency_job_id":null,"html_url":"https://github.com/meowgorithm/baby-twilio","commit_stats":null,"previous_names":["magicnumbers/baby-twilio"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/meowgorithm/baby-twilio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbaby-twilio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbaby-twilio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbaby-twilio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbaby-twilio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meowgorithm","download_url":"https://codeload.github.com/meowgorithm/baby-twilio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowgorithm%2Fbaby-twilio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265534880,"owners_count":23783908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","sms","twilio"],"created_at":"2024-10-09T17:06:17.887Z","updated_at":"2025-07-16T19:36:02.027Z","avatar_url":"https://github.com/meowgorithm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Baby Twilio\n===========\n\nMost of the time with Twilio we want to do one of two things: send an SMS and\nparse incoming SMSes. This package makes it easy to do both.\n\n\n## Sending SMSes\n\nIn the most simple case, you can set three environment variables per Twilio\n(`TWILIO_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_PHONE_NUMBER`) and then use a\nlittle function to fire off your SMSes.\n\n```go\npackage main\n\nimport (\n\t\"baby-twilio\"\n\t\"log\"\n)\n\nfunc main() {\n\tif _, err := twilio.SendSMS(\"+1-212-555-1212\", \"Well, hello there.\"); err != nil {\n\t\tlog.Fatal(\"It didn‘t work: \", err)\n\t}\n}\n```\n\nFor more thorough examples, including ones that don‘t require setting\nenvironment variables, see the `examples` directory.\n\n\n## Receiving SMSes\n\nParsing incoming SMSes is just a matter of pointing a webhook at your server\nin the Twilio admin interface and parsing incoming requests as such:\n\n```go\npackage main\n\nimport (\n\t\"github.com/meowgorithm/baby-twilio\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\t// Handle incoming HTTP requests\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tvar (\n\t\t\tsms *twilio.Request\n\t\t\terr error\n\t\t)\n\n\t\t// Decode request data from Twilio\n\t\tif sms, err = twilio.NewDecoder(r); err != nil {\n\t\t\tlog.Println(\"could not decode incoming SMS: \", err)\n\t\t\treturn\n\t\t}\n\n\t\tlog.Printf(\"Incoming SMS from %s: %s\", sms.From, sms.Body)\n\t})\n\n\thttp.ListenAndServe(\":8000\", nil)\n}\n```\n\nFor local development we recommend [ngrok][ng].\n\n\n## License\n\nMIT\n\n[ng]: https://ngrok.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowgorithm%2Fbaby-twilio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeowgorithm%2Fbaby-twilio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowgorithm%2Fbaby-twilio/lists"}