{"id":34505212,"url":"https://github.com/fitri-hy/whastapp-webhook","last_synced_at":"2026-05-27T12:31:31.108Z","repository":{"id":289442936,"uuid":"971267873","full_name":"fitri-hy/whastapp-webhook","owner":"fitri-hy","description":"WhatsApp Webhook acts as a communication bridge between the WhatsApp messaging platform and your application. It listens for incoming messages or events sent by users and allows your backend to process and respond accordingly with an auto-reply bot.","archived":false,"fork":false,"pushed_at":"2025-04-23T09:22:34.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T10:24:46.920Z","etag":null,"topics":["auto-reply","baileys","bot","nodejs","wabot","webhook","whastapp","whatsapp-bot","whiskeysockets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fitri-hy.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}},"created_at":"2025-04-23T09:06:33.000Z","updated_at":"2025-04-23T09:22:38.000Z","dependencies_parsed_at":"2025-04-23T10:24:55.134Z","dependency_job_id":"a29195e9-62d0-4ac4-b5c3-4d99caf4f578","html_url":"https://github.com/fitri-hy/whastapp-webhook","commit_stats":null,"previous_names":["fitri-hy/whastapp-webhook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fitri-hy/whastapp-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitri-hy%2Fwhastapp-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitri-hy%2Fwhastapp-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitri-hy%2Fwhastapp-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitri-hy%2Fwhastapp-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitri-hy","download_url":"https://codeload.github.com/fitri-hy/whastapp-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitri-hy%2Fwhastapp-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33566872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["auto-reply","baileys","bot","nodejs","wabot","webhook","whastapp","whatsapp-bot","whiskeysockets"],"created_at":"2025-12-24T02:55:28.514Z","updated_at":"2026-05-27T12:31:31.101Z","avatar_url":"https://github.com/fitri-hy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whastapp Webhook\n\nWhatsApp Webhook acts as a communication bridge between the WhatsApp messaging platform and your application. It listens for incoming messages or events sent by users and allows your backend to process and respond accordingly with an auto-reply bot.\n\n## Webhook\n\n\u003e You can configure and manage your application's webhooks in the `/routes/web.js` file. This is where you can define routes and logic to effectively handle incoming webhook requests.\n\n### ➤ Text\n```\nPOST http://localhost:3000/webhook/text\n```\n\n#### Authorization\n\n| **Key**       | **Value**            | **Add to** |\n|---------------|----------------------|------------|\n| `x-api-key`   | `your-api-key-here`  | Headers    |\n\n#### Body Request\n\n\u003e *Supports multiple recipients*\n\n```\n{\n  \"recipient\": [628xxxxxxxx, 628xxxxxxxx],\n  \"data\": \"your string data\"\n}\n```\n\n### ➤ Image\n```\nPOST http://localhost:3000/webhook/image\n```\n\n#### Authorization\n\n| **Key**       | **Value**            | **Add to** |\n|---------------|----------------------|------------|\n| `x-api-key`   | `your-api-key-here`  | Headers    |\n\n#### Body Request\n\n\u003e *Supports multiple recipients*\n\n```\n{\n  \"recipient\": [628xxxxxxxx, 628xxxxxxxx],\n  \"image\": \"url_images\",\n  \"data\": \"your string data\"\n}\n```\n\n### ➤ Audio\n```\nPOST http://localhost:3000/webhook/audio\n```\n\n#### Authorization\n\n| **Key**       | **Value**            | **Add to** |\n|---------------|----------------------|------------|\n| `x-api-key`   | `your-api-key-here`  | Headers    |\n\n#### Body Request\n\n\u003e *Supports multiple recipients*\n\n```\n{\n  \"recipient\": [628xxxxxxxx, 628xxxxxxxx],\n  \"audio\": \"url_audio\"\n}\n```\n\n### ➤ Video\n```\nPOST http://localhost:3000/webhook/video\n```\n\n#### Authorization\n\n| **Key**       | **Value**            | **Add to** |\n|---------------|----------------------|------------|\n| `x-api-key`   | `your-api-key-here`  | Headers    |\n\n#### Body Request\n\n\u003e *Supports multiple recipients*\n\n```\n{\n  \"recipient\": [628xxxxxxxx, 628xxxxxxxx],\n  \"video\": \"url_video\",\n  \"data\": \"your string data\"\n}\n```\n\n### ➤ Location\n```\nPOST http://localhost:3000/webhook/location\n```\n\n#### Authorization\n\n| **Key**       | **Value**            | **Add to** |\n|---------------|----------------------|------------|\n| `x-api-key`   | `your-api-key-here`  | Headers    |\n\n#### Body Request\n\n\u003e *Supports multiple recipients*\n\n```\n{\n  \"recipient\": [628xxxxxxxx, 628xxxxxxxx],\n  \"location\": \"latitude,longitude\"\n}\n```\n\n## Bot Auto Reply\n\n\u003e How to add auto reply You can follow the steps in the plugin section.\n\n| Message Condition (exact) \t\t\t| Utility                              |\n|---------------------------------------|--------------------------------------|\n| `.text`                   \t\t\t| Sends a text     \t\t\t\t\t   |\n| `.img`                    \t\t\t| Sends a image                        |\n| `.audio`                  \t\t\t| Sends a audio file                   |\n| `.video`                  \t\t\t| Sends a video file                   |\n| `.location`               \t\t\t| Sends a location (coordinates/map)   |\n| `.add-plugin \u003cfilename.js\u003e \u003ccode\u003e` \t| Create or Edit plugins\t\t\t\t|\n| `.list-plugin`               \t\t\t| list of plugin names\t\t\t\t\t|\n| `.delete-plugin \u003cfilename.js\u003e`\t\t| delete plugins\t\t\t\t\t\t|\n| `.copy-plugin \u003cfilename.js\u003e`\t\t\t| copy plugins\t\t\t\t\t\t|\n\n## Plugin Templates\n\n\u003e Rules you must follow for the plugin to work.\n\n```\nmodule.exports = async (sock, message, msg, sender) =\u003e {\n  // your plugin function\n};\n```\n\n*This is a complete plugin example with emoji reactions and quote message replies. You can see more examples in `plugin/basicMessage.js`*\n\n### Create Plugin In Messages\n\n\u003e You can create a plugin directly in the message format `.add-plugin \u003cfilename\u003e.js \u003ccode\u003e`. See this example:\n\n```\n.add-plugin test.js\nmodule.exports = async (sock, message, msg, sender) =\u003e {\n  if (msg \u0026\u0026 msg.toLowerCase() === '.test') {\n    await sock.sendMessage(sender, { text: 'This is the answer to the test' });\n  }\n};\n```\n\n*The system will automatically sync data and install your plugin's required dependencies if they are not already available.*\n\n[Watch Video](./vid.mp4)\n\n## Config (`/config/config.js`)\n\n- **BOT_NUMBER**: WhatsApp number registered for the bot (pairing code).\n- **PORT**: Server port number.\n- **WEBHOOK_TIMEOUT**: Maximum time (in ms) for webhook response.\n- **WEBHOOK_SANITATION** : Use sanitation on every request (`true/false`).\n- **SOCKET_TIMEOUT**: Timeout duration (in ms) for socket connection.\n- **SOCKET_ATTEMPTS**: Number of retries for socket connection.\n- **SOCKET_PAIRING**: Use connection using pairing code (`true/false`).\n- **API_KEY**: Authentication key for webhook service.\n- **CORS_ORIGIN**: List of domains allowed to access the API.\n- **CORS_CREDENTIALS**: Are credentials allowed in cross-domain requests (`true/false`).\n- **SELF_MODE_GLOBAL:**: Only bots that respond to own global message commands? (`true/false`).\n- **SELF_MODE_PLUGIN:**: Only bots that respond to own plugin commands? (`true/false`).\n- **GROUP_GREETING:**: Greeting when members join/leave (`true/false`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitri-hy%2Fwhastapp-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitri-hy%2Fwhastapp-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitri-hy%2Fwhastapp-webhook/lists"}