github.com/masewo/whatsapp-cloud-api
Readme
Lightweight Whatsapp Cloud API Wrapper v14.0 for Golang with no dependency.
Made this cause I haven't found any reliable whatsapp cloud api wrapper for golang
Content
go get github.com/febriliankr/whatsapp-cloud-api
or if you want to use specific version
go get github.com/febriliankr/whatsapp-cloud-api@v1.0.2
wa := whatsapp.NewWhatsapp(token, myPhoneID)
Modifying instance
wa.Language = TemplateLanguage{ Code: "id" }
wa.APIVersion = "v14.0"
wa.PhoneNumberID = WHATSAPP_PHONE_ID
With one parameter
parameters := wa.GenerateTemplateParameters("text", "48884")
components := wa.TemplateComponent("body", parameters)
res, err := wa.SendWithTemplate("RECEIVER_PHONE_NUMBER", "your_template_name", components)
with no parameter
res, err := wa.SendWithTemplate("RECEIVER_PHONE_NUMBER", "your_template_name", nil)
Sending plain text message to a phone number that has messaged your WhatsApp Business account in the past 24 hours.
res, err := wa.SendText("RECEIVER_PHONE_NUMBER", "your_message")
Check more usage example in example/example.go
Official documentation:
Throughput?
Question: How do I signup to get the token?
Question: Whats the difference between Qiscus and other provider's Whatsapp API to this Cloud API?
Releasing new version
$ git commit -m "hello: changes for v1.0.0"
$ git tag v1.0.0
$ git push origin v1.0.0
FAQs
Unknown package
We found that github.com/masewo/whatsapp-cloud-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.