[PR #12] [CLOSED] feature webhook on session #76

Closed
opened 2026-02-27 10:24:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mimamch/wa-gateway/pull/12
Author: @huiralb
Created: 7/13/2023
Status: Closed

Base: masterHead: feat/webhook


📝 Commits (1)

  • 2bbbda3 feature webhook on session

📊 Changes

7 files changed (+1052 additions, -455 deletions)

View changed files

📝 .env (+3 -1)
📝 app/controllers/session_controller.js (+20 -0)
📝 index.js (+7 -0)
📝 package-lock.json (+1002 -454)
📝 package.json (+4 -0)
utils/request.js (+1 -0)
utils/webhook.js (+15 -0)

📄 Description

Hello @mimamch . I just added feature webhook. At this moment i added for session section.

Reason

We want to any callback or message from server-gateway to tell client-server which the session was connected.

Usage

  1. Add variable to .env file with WEBHOOK_ENABLED=true
  2. Now the url to connect new session is:
    GET /start-session?session=NEW_SESSION_NAME&scan=true&webhookUrl=http://client-server.test/callback
    We assume you have client-server url http://client-server.test/callback
  3. At client url you should grab $_POST['session'] and $_POST['event']

Extra:

  • If you want have webhook when server on ready start, you should Add variable to .env file with WEBHOOK_URL=http://client-server.test/callback

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mimamch/wa-gateway/pull/12 **Author:** [@huiralb](https://github.com/huiralb) **Created:** 7/13/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat/webhook` --- ### 📝 Commits (1) - [`2bbbda3`](https://github.com/mimamch/wa-gateway/commit/2bbbda30890bf018fa031ee83628d66816939219) feature webhook on session ### 📊 Changes **7 files changed** (+1052 additions, -455 deletions) <details> <summary>View changed files</summary> 📝 `.env` (+3 -1) 📝 `app/controllers/session_controller.js` (+20 -0) 📝 `index.js` (+7 -0) 📝 `package-lock.json` (+1002 -454) 📝 `package.json` (+4 -0) ➕ `utils/request.js` (+1 -0) ➕ `utils/webhook.js` (+15 -0) </details> ### 📄 Description Hello @mimamch . I just added feature webhook. At this moment i added for session section. ## Reason We want to any callback or message from server-gateway to tell client-server which the session was connected. ## Usage 1. Add variable to `.env` file with `WEBHOOK_ENABLED=true` 2. Now the url to connect new session is: GET `/start-session?session=NEW_SESSION_NAME&scan=true&webhookUrl=http://client-server.test/callback` We assume you have client-server url `http://client-server.test/callback` 3. At client url you should grab `$_POST['session']` and `$_POST['event']` Extra: - If you want have webhook when server on ready start, you should Add variable to `.env` file with `WEBHOOK_URL=http://client-server.test/callback` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:24:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wa-gateway-mimamch#76
No description provided.