{"id":15180439,"url":"https://github.com/green-api/whatsapp-api-webhook-server-golang","last_synced_at":"2026-03-01T02:04:01.275Z","repository":{"id":65917228,"uuid":"601964400","full_name":"green-api/whatsapp-api-webhook-server-golang","owner":"green-api","description":"Create a golang server endpoint to get WhatsApp messages webhooks","archived":false,"fork":false,"pushed_at":"2025-03-02T19:46:33.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-17T02:31:56.659Z","etag":null,"topics":["go","golang","whatsapp","whatsapp-api","whatsapp-api-go","whatsapp-bot","whatsapp-chatbot"],"latest_commit_sha":null,"homepage":"https://green-api.com/en/docs/sdk/golang/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/green-api.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-15T07:53:19.000Z","updated_at":"2023-12-21T04:48:45.000Z","dependencies_parsed_at":"2024-06-20T16:17:35.290Z","dependency_job_id":"c6b539f7-811e-4c41-8623-2321ccc99f38","html_url":"https://github.com/green-api/whatsapp-api-webhook-server-golang","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/green-api/whatsapp-api-webhook-server-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-api%2Fwhatsapp-api-webhook-server-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-api%2Fwhatsapp-api-webhook-server-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-api%2Fwhatsapp-api-webhook-server-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-api%2Fwhatsapp-api-webhook-server-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/green-api","download_url":"https://codeload.github.com/green-api/whatsapp-api-webhook-server-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-api%2Fwhatsapp-api-webhook-server-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29958411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","golang","whatsapp","whatsapp-api","whatsapp-api-go","whatsapp-bot","whatsapp-chatbot"],"created_at":"2024-09-27T16:06:21.928Z","updated_at":"2026-03-01T02:04:01.231Z","avatar_url":"https://github.com/green-api.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whatsapp-api-webhook-server-golang\r\n\r\n- [Документация на русском языке](docs/README_RU.md).\r\n\r\nwhatsapp-api-webhook-server-golang is a library for integration with WhatsApp messenger using the API\r\nservice [green-api.com](https://green-api.com/en/). You should get a registration token and an account ID in\r\nyour [personal cabinet](https://console.green-api.com/) to use the library. There is a free developer account tariff.\r\n\r\n## API\r\n\r\nThe documentation for the REST API can be found at the [link](https://green-api.com/en/docs/). The library is a wrapper\r\nfor the REST API, so the documentation at the link above also applies.\r\n\r\n## Authorization\r\n\r\nTo send a message or perform other Green API methods, the WhatsApp account in the phone app must be authorized. To\r\nauthorize the account, go to your [cabinet](https://console.green-api.com/) and scan the QR code using the WhatsApp app.\r\n\r\n## Example of preparing the environment for Ubuntu Server\r\n\r\n### Go Installation\r\n\r\nGo must be installed on the server. [Go installation instructions](https://go.dev/doc/install).\r\n\r\n### Updating the system\r\n\r\nUpdate the system:\r\n\r\n```shell\r\nsudo apt update\r\nsudo apt upgrade -y\r\n```\r\n\r\n### Firewall\r\n\r\nSet up the firewall:\r\n\r\nAllow the SSH connection:\r\n\r\n```shell\r\nsudo ufw allow ssh\r\n```\r\n\r\nBase rules:\r\n\r\n```shell\r\nsudo ufw default deny incoming\r\nsudo ufw default allow outgoing\r\n```\r\n\r\nAllow HTTP and HTTPS connections:\r\n\r\n```shell\r\nsudo ufw allow http\r\nsudo ufw allow https\r\n```\r\n\r\nEnable the firewall:\r\n\r\n```shell\r\nsudo ufw enable\r\n```\r\n\r\n## How to run the web server\r\n\r\n### Installation\r\n\r\nDo not forget to create a module:\r\n\r\n```shell\r\ngo mod init example\r\n```\r\n\r\nInstallation:\r\n\r\n```shell\r\ngo get github.com/green-api/whatsapp-api-webhook-server-golang\r\n```\r\n\r\n### Import\r\n\r\n```\r\nimport (\r\n\t\"github.com/green-api/whatsapp-api-webhook-server-golang/pkg\"\r\n)\r\n```\r\n\r\n### Examples\r\n\r\n#### How to initialize an object\r\n\r\nThe WebhookToken attribute is optional.\r\n\r\n```\r\nwebhook := pkg.Webhook{\r\n    Address:      \":80\",\r\n    Pattern:      \"/\",\r\n}\r\n```\r\n\r\n#### How to run the web server\r\n\r\nThe StartServer function takes a handler function. The handler function must have 1\r\nparameter (`body map[string]interface{}`). When a new notification is received, your handler function will be executed.\r\n\r\nLink to example: [main.go](examples/main.go).\r\n\r\n```\r\n_ := webhook.StartServer(func(body map[string]interface{}) {\r\n    fmt.Println(body)\r\n})\r\n```\r\n\r\n### Running the application\r\n\r\n```shell\r\ngo run main.go\r\n```\r\n\r\n## Service methods documentation\r\n\r\n[Service methods documentation](https://green-api.com/en/docs/api/)\r\n\r\n## License\r\n\r\nLicensed under [\r\nAttribution-NoDerivatives 4.0 International (CC BY-ND 4.0)\r\n](https://creativecommons.org/licenses/by-nd/4.0/) terms.\r\nPlease see file [LICENSE](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-api%2Fwhatsapp-api-webhook-server-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreen-api%2Fwhatsapp-api-webhook-server-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-api%2Fwhatsapp-api-webhook-server-golang/lists"}