{"id":15633162,"url":"https://github.com/mimamch/wa-gateway","last_synced_at":"2025-10-06T00:39:18.488Z","repository":{"id":90914001,"uuid":"551241971","full_name":"mimamch/wa-gateway","owner":"mimamch","description":"Headless Multi Session Whatsapp Gateway API","archived":false,"fork":false,"pushed_at":"2025-04-17T04:44:39.000Z","size":568,"stargazers_count":263,"open_issues_count":25,"forks_count":137,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-17T18:30:47.851Z","etag":null,"topics":["nodejs","wa-gateway","whatsapp","whatsapp-api","whatsapp-gateway"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/mimamch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"mimamch","thanks_dev":null,"custom":["https://trakteer.id/mimamch/tip"]}},"created_at":"2022-10-14T03:55:46.000Z","updated_at":"2025-04-17T04:44:43.000Z","dependencies_parsed_at":"2024-12-30T05:10:26.537Z","dependency_job_id":"9d4a0ff8-3f3a-402a-af7f-ad9121ead255","html_url":"https://github.com/mimamch/wa-gateway","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":0.1777777777777778,"last_synced_commit":"41dcfeaf2592e807151d988142761aba2fd36e9d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimamch%2Fwa-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimamch%2Fwa-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimamch%2Fwa-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimamch%2Fwa-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimamch","download_url":"https://codeload.github.com/mimamch/wa-gateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"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":["nodejs","wa-gateway","whatsapp","whatsapp-api","whatsapp-gateway"],"created_at":"2024-10-03T10:47:12.232Z","updated_at":"2025-10-06T00:39:13.447Z","avatar_url":"https://github.com/mimamch.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/mimamch","https://trakteer.id/mimamch/tip"],"categories":[],"sub_categories":[],"readme":"# Headless Multi Session Whatsapp Gateway NodeJS\n\nEasy Setup Headless multi session Whatsapp Gateway with NodeJS\n\n- Support Multi device\n- Support Multi Session / Multi Phone Number\n- Send Text Message\n- Send Image\n- Send Document\n\n#### Read also [wa-multi-session](https://github.com/mimamch/wa-multi-session)\n\n### ⚠️ This application need to running in NodeJS v18 or later. ⚠️\n\n#### Please Read [How to install NodeJS](https://nodejs.org/en/download/package-manager)\n\n## Install and Running\n\n#### 1. Clone the project\n\n```bash\n  git clone https://github.com/mimamch/wa_gateway.git\n```\n\n#### 2. Go to the project directory\n\n```bash\n  cd wa_gateway\n```\n\n#### 3. Install dependencies\n\n```bash\n  npm install\n```\n\n#### 4. Start the server\n\n```bash\n  npm run start\n```\n\n#### 5. Open On Browser \u0026 Start Scan QR\n\n```\nhttp://localhost:5001/session/start?session=mysession\n```\n\n#### 6. Sending first message\n\n```\nhttp://localhost:5001/message/send-text?session=mysession\u0026to=628123456789\u0026text=Hello\n```\n\n## API Reference\n\n#### Add new session\n\n```\n  GET /session/start?session=NEW_SESSION_NAME\n  or\n  POST /session/start\n```\n\n| Parameter | Type     | Description                            |\n| :-------- | :------- | :------------------------------------- |\n| `session` | `string` | **Required**. Create Your Session Name |\n\n#### Send Text Message\n\n```\n  POST /message/send-text\n```\n\n| Body       | Type      | Description                                                              |\n| :--------- | :-------- | :----------------------------------------------------------------------- |\n| `session`  | `string`  | **Required**. Session Name You Have Created                              |\n| `to`       | `string`  | **Required**. Receiver Phone Number with Country Code (e.g: 62812345678) |\n| `text`     | `string`  | **Required**. Text Message                                               |\n| `is_group` | `boolean` | **Optional**. True if \"to\" field is group ids                            |\n\n#### Send Image\n\n```\n  POST /message/send-image\n```\n\n| Body        | Type      | Description                                                              |\n| :---------- | :-------- | :----------------------------------------------------------------------- |\n| `session`   | `string`  | **Required**. Session Name You Have Created                              |\n| `to`        | `string`  | **Required**. Receiver Phone Number with Country Code (e.g: 62812345678) |\n| `text`      | `string`  | **Required**. Caption Massage                                            |\n| `image_url` | `string`  | **Required**. URL Image                                                  |\n| `is_group`  | `boolean` | **Optional**. True if \"to\" field is group ids                            |\n\n#### Send Document\n\n```\n  POST /message/send-document\n```\n\n| Body            | Type      | Description                                                              |\n| :-------------- | :-------- | :----------------------------------------------------------------------- |\n| `session`       | `string`  | **Required**. Session Name You Have Created                              |\n| `to`            | `string`  | **Required**. Receiver Phone Number with Country Code (e.g: 62812345678) |\n| `text`          | `string`  | **Required**. Caption Massage                                            |\n| `document_url`  | `string`  | **Required**. Document URL                                               |\n| `document_name` | `string`  | **Required**. Document Name                                              |\n| `is_group`      | `boolean` | **Optional**. True if \"to\" field is group ids                            |\n\n#### Delete session\n\n```\n  GET /session/logout?session=SESSION_NAME\n```\n\n| Parameter | Type     | Description                            |\n| :-------- | :------- | :------------------------------------- |\n| `session` | `string` | **Required**. Create Your Session Name |\n\n#### Get All Session ID\n\n```\n  GET /session\n```\n\n## Examples\n\n### Using Axios\n\n```js\n// send text\naxios.post(\"http://localhost:5001/message/send-text\", {\n  session: \"mysession\",\n  to: \"62812345678\",\n  text: \"hello world\",\n});\n\n// send image\naxios.post(\"http://localhost:5001/message/send-image\", {\n  session: \"mysession\",\n  to: \"62812345678\",\n  text: \"hello world\",\n  image_url: \"https://placehold.co/600x400\",\n});\n```\n\n## Webhook Guide\n\nSet your webhook URL in the environment variable `WEBHOOK_BASE_URL` or in the `.env` file.\nThe request method will be `POST` and the body will be in JSON format.\n\n```\nWEBHOOK_BASE_URL=\"http://yourdomain.com/webhook\"\n```\n\n### 🪝 Session Webhook\n\nRequest path:\n\n```\nPOST http://yourdomain.com/webhook/session\n```\n\nExample body:\n\n```js\n{\n  \"session\": \"mysession\",\n  \"status\": \"connected\" //  \"disconnected\" | \"connecting\"\n}\n```\n\n### 🪝 Message Webhook\n\nRequest path:\n\n```\nPOST http://yourdomain.com/webhook/message\n```\n\nExample body:\n\n```js\n{\n  \"session\": \"mysession\",\n  \"from\": \"xxx@s.whatsapp.net\",\n  \"message\": \"Hello World\",\n  \"media\": {\n    \"image\": \"3A5089C2F2652D46EBC5.jpg\",\n    \"video\": null,\n    \"document\": null,\n    \"audio\": null\n  }\n}\n```\n\nYou can get the media file by using the `media` object in the webhook message. The media file will be saved in the `./media` directory with the name specified in the `media` object.\nYou can access media files using the following URL format:\n\n```\nhttp://localhost:5001/media/3A5089C2F2652D46EBC5.jpg\n```\n\n## Upgrading\n\n```\nnpm install wa-multi-session@latest\n```\n\n## Documentation\n\nFor detailed documentation, including guides and API references, please visit the [official documentation](https://github.com/mimamch/wa-gateway).\n\n## Contributing\n\nContributions are welcome! Please follow the guidelines outlined in the [CONTRIBUTING.md](https://github.com/mimamch/wa-gateway/blob/main/CONTRIBUTING.md) file.\n\n## License\n\nThis library is licensed under the [MIT License](https://github.com/mimamch/wa-gateway/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimamch%2Fwa-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimamch%2Fwa-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimamch%2Fwa-gateway/lists"}