{"id":15103130,"url":"https://github.com/great-detail/whatsapp-nodejs-sdk","last_synced_at":"2025-06-26T02:36:59.460Z","repository":{"id":197191973,"uuid":"698148251","full_name":"great-detail/WhatsApp-Nodejs-SDK","owner":"great-detail","description":"NodeJS SDK and CLI for Meta's WhatsApp Business Messaging APIs - Cloud API","archived":false,"fork":false,"pushed_at":"2025-05-28T08:08:17.000Z","size":4159,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-28T09:21:09.514Z","etag":null,"topics":["cli","facebook","meta","sdk","sdk-nodejs","whatsapp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"WhatsApp/WhatsApp-Nodejs-SDK","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/great-detail.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-29T09:09:21.000Z","updated_at":"2025-05-28T08:08:19.000Z","dependencies_parsed_at":"2025-06-02T23:35:14.333Z","dependency_job_id":null,"html_url":"https://github.com/great-detail/WhatsApp-Nodejs-SDK","commit_stats":null,"previous_names":["great-detail/whatsapp-nodejs-sdk"],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/great-detail/WhatsApp-Nodejs-SDK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/great-detail%2FWhatsApp-Nodejs-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/great-detail%2FWhatsApp-Nodejs-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/great-detail%2FWhatsApp-Nodejs-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/great-detail%2FWhatsApp-Nodejs-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/great-detail","download_url":"https://codeload.github.com/great-detail/WhatsApp-Nodejs-SDK/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/great-detail%2FWhatsApp-Nodejs-SDK/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261987780,"owners_count":23240911,"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":["cli","facebook","meta","sdk","sdk-nodejs","whatsapp"],"created_at":"2024-09-25T19:21:29.690Z","updated_at":"2025-06-26T02:36:59.435Z","avatar_url":"https://github.com/great-detail.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js SDK for WhatsApp Business Platform APIs\n\nAn unofficial SDK for Meta's WhatsApp Business Messaging APIs - Cloud API.\nOriginally a fork of the\n[deprecated official SDK for Meta's WhatsApp Business Messaging APIs](https://github.com/WhatsApp/WhatsApp-Nodejs-SDK).\n\n[![npm (scoped)][]][sdk-npmjs] [![Lint, Format, Test \u0026 Build][]][sdk-ci]\n\n[npm (scoped)]: https://img.shields.io/npm/v/%40great-detail/whatsapp\n[sdk-npmjs]: https://www.npmjs.com/package/@great-detail/whatsapp\n[Lint, Format, Test \u0026 Build]:\n  https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml/badge.svg\n[sdk-ci]:\n  https://github.com/great-detail/WhatsApp-Nodejs-SDK/actions/workflows/nodejs.ci.yml\n\n## Getting started\n\n**ESM Import**:\n\n```ts\nimport Client from \"@great-detail/whatsapp\";\n```\n\n**CJS Import**:\n\n```ts\nconst Client = require(\"@great-detail/whatsapp\").default;\n```\n\n**Usage**:\n\n```typescript\nconst sdk = new Client();\nconst message = await sdk.message.createMessage({\n  phoneNumberID: \"123...809\",\n  to: \"1234567890\",\n  type: \"text\",\n  text: {\n    body: \"Hello\",\n  },\n  request: {\n    headers: {\n      Authorization: \"Bearer ...\",\n    },\n  },\n});\n```\n\n## Installation\n\nInstall the WhatsApp Business Platform SDK:\n\n```bash\n# NPM:\nnpm install @great-detail/whatsapp\n\n# Yarn:\nyarn add @great-detail/whatsapp\n\n# PNPM:\npnpm add @great-detail/whatsapp\n```\n\n## CLI Usage\n\n```bash\nexport WHATSAPP_ACCESS_TOKEN=\"\"\nexport WHATSAPP_PHONE_NUMBER_ID=\"\"\n\n# NPM / Yarn / PNPM\nnpx @great-detail/whatsapp ...\nyarn dlx @great-detail/whatsapp ...\npnpx @great-detail/whatsapp ...\n\n# Send a Text Message\n# TODO: Re-add with updated SDK\nnpx @great-detail/whatsapp message send text \"\u003cRECIPIENT\u003e\" --body=\"Hello, World!\"\n# Note: \u003cRECIPIENT\u003e may be a Phone Number ID - it may not always be the phone number itself.\n\n# Send an Image Message\n# TODO: Re-add with updated SDK\n# npx @great-detail/whatsapp message send image \"\u003cRECIPIENT\u003e\" --media-id=\"\u003cMEDIA_ID\u003e\"\n# Use --filename=\"...\" to set the filename of the image.\n# Use --caption=\"...\" to set a caption on the image.\n\n# Upload a Media File\nnpx @great-detail/whatsapp media upload --mime-type=\"\u003cMIME_TYPE\u003e\" \u003c \"\u003cFILE_FROM_STDIN\u003e\"\n\n# Get a Media File's URL\nnpx @great-detail/whatsapp media get-url \"\u003cMEDIA_ID\u003e\"\n# Note: With WHATSAPP_PHONE_NUMBER_ID set, the request will check if the media\n# is available for that phone number. To prevent this check, unset the env var\n# or add --phone-number-id=\"\" to the command.\n\n# Download a Media File\nnpx @great-detail/whatsapp media download \"\u003cMEDIA_URL\u003e\" \u003e \"\u003cFILE_TO_STDOUT\u003e\"\n```\n\n## Compatibility\n\nThis SDK is designed to be compatible with the Cloud API API.\n\n| SDK  | Cloud API | NodeJS |\n| :--- | :-------: | -----: |\n| v7.x |    v20    |   v18+ |\n\nWhilst the SDK may work with alternative versions of the Graph API, it is\ndesigned to work with the above. If you find any compatibility issues, please\nreport them via\n[GitHub Issues](https://github.com/great-detail/WhatsApp-Nodejs-SDK/issues).\n\n**Tested on NodeJS**: `v21`, `v22`, `v23`.\n\nAdditional NodeJS versions may also work, however, automated testing requires\nNodeJS' test suite, which was introduced in `v21`.\n\n## TODO\n\nThere are a number of features supported by the WhatsApp Business Cloud API that\nare yet to be implemented in this SDK. Please feel free to contribute via a Pull\nRequest, or note your interest in particular features by creating an issue for\nit.\n\n- [ ] Interactive Message Types.\n- [ ] Template Message Types.\n- [ ] Button Message Types.\n- [ ] Flow Message Types.\n- [ ] List Message Types.\n- [x] WABA Webhook Subscription Management.\n- [ ] WABA Extended Credit Management.\n- [x] WABA Phone Number Management.\n- [ ] WABA System User Management?\n- [ ] Considering Authentication usage improvements.\n\n## License\n\nThe WhatsApp Business Platform Node.js SDK for the Cloud API is Meta Platforms\nlicensed, as found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreat-detail%2Fwhatsapp-nodejs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreat-detail%2Fwhatsapp-nodejs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreat-detail%2Fwhatsapp-nodejs-sdk/lists"}