Jump to content

Recommended Posts

On 7/19/2024 at 9:28 PM, Magd Almuntaser said:

How To Run (Whatsapp Gateway Multi Device) Via SSL
(For All Version)

((aaPanel))

1-  let's assume the script is located at this domain:

https:// magd.com/ws

2- edit the .env file located in the root directory of the script and change these fields to https:// and Port to 3100 or any port you want.

APP_URL=https://magd .com
WA_URL_SERVER=https://magd .com:3100
PORT_NODE=3100

image.thumb.jpeg.645f92bdc3ec70c1c0165471e56b5ca2.jpeg

 

3- Open the .htaccess in the root path of the script and clear all code and save it.

4- Go to website and click Not Set (Under SSL):

image.thumb.jpeg.acf8c96ce6a2c53b37aede58bdf58b24.jpeg

 

5- Click on let's encrypt and make sure the File verification and Domain name are selected:
 

image.jpeg.3210fbf7096d3600a0a63d54af1bd8fc.jpeg

 

6- After pressing apply, it will automatically generate SSL on your site and after completion, go to Certificate holder and press Deploy:
 

image.jpeg.696e2c99da3f29455cfe68f687140493.jpeg

 

7- You will automatically be taken to Curr, Other Certs and if you are not taken, click on it and you will see the Private key (KEY), copy and save it to key.pem and Certificate (CRT/PEM), copy and save it to cert.key, and make sure you have set Force HTTPS to On:
 

image.jpeg.a81fab301853ca471c6c7f97b5d208bf.jpeg

 

8- upload the two files we saved, cert.pem and key.pem, to the root directory of the script. Then, we will edit the server.js file and replace this code from:

/**
 * EXPRESS FOR ROUTING
 */
const express = require("express");
const app = express();
const http = require("http");
const server = http.createServer(app);

To:

/**
 * EXPRESS FOR ROUTING
 */
const serverOptions = {
  key: fs.readFileSync('key.pem'),
  cert: fs.readFileSync('cert.pem')
}

const express = require("express");
const app = express();
const https = require("https");
const server = https.createServer(serverOptions, app);

 

9- edit the routes/web.php file and add this code at the end of the file:
 

URL::forceScheme('https');

image.jpeg.f310d55f781bcb606f7117bbf16a4977.jpeg

 

10- Open .htaccess again, put the following code inside and save:

<IfModule mod_rewrite.c>
    RewriteEngine On

 RewriteCond %{REQUEST_URI} !^/socket.io/
 RewriteCond %{REQUEST_URI} !^/backend-*
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L,QSA]
</IfModule>
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

11- Open the website again, click on Node Project and click on Not Set:

image.thumb.jpeg.8b345eaf84d5ddf971666ecf1a1a45a9.jpeg

 

12- Click on Certificate holder and then Deploy:

image.jpeg.696e2c99da3f29455cfe68f687140493.jpeg

 

13- The following page will automatically appear, just click Save :

image.jpeg.b241907f9392bdc90589447e0a941b5d.jpeg

 

Now you can restart Node.js and enjoy using the script over HTTPS

 

Bro Magd, can you explain step by step from begining how to install on aapanel?

I am confusing when add node js project. always fail to start

  • DW Members
1 hour ago, sonu kumar saini said:

qr genrate and whatsapp connect successfully but after run node js show error

returncode: 1
stdout:
> wamd@7.0.0.1 start
> NODE_ENV=production node server.js

Server run and listening port: 3100
stderr:
node:internal/deps/undici/undici:7154
      return await WebAssembly.instantiate(mod, {
                               ^

RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance
    at lazyllhttp (node:internal/deps/undici/undici:7154:32)

Node.js v20.14.0

Out of memory error may be caused by hitting LVE limits
or "Max data size", "Max address space" or "Max resident set" process limits
Please check LVE limits and process limits. Readjust them if necessary
More info: https://docs.cloudlinux.com/shared/cloudlinux_os_components/#known-restrictions-and-issues

process limits "/proc/1745578/limits":
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    0                    bytes     
Max resident set          4294967296           4294967296           bytes     
Max processes             unlimited            unlimited            processes 
Max open files            1048576              1048576              files     
Max locked memory         unlimited            unlimited            bytes     
Max address space         4294967296           4294967296           bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       unlimited            unlimited            signals   
Max msgqueue size         unlimited            unlimited            bytes     
Max nice priority         unlimited            unlimited            
Max realtime priority     unlimited            unlimited            
Max realtime timeout      unlimited            unlimited            us        

and port 3100 show disconnect but test message run but auto reply not working

any one solv this in cpanel

back to node v18 .. i think your problem with node v20

10 minutes ago, nikokenzo said:

Bro Magd, can you explain step by step from begining how to install on aapanel?

I am confusing when add node js project. always fail to start

I don't have an aapanel to explain the method. I used a member's server that was given to me for my demonstration, but I no longer have it.

On 8/2/2024 at 12:20 PM, Magd Almuntaser said:

Whatsapp Gateway Multi Device (Magd Version) v7.0.0.1

 

This version is separate from the original version. It contains many additions and fixes.

You can update your existing version on your site or do a fresh install, but I prefer a fresh install and re-linking your phone to ensure the new session works without conflict and to avoid losing connection.


Installation Instructions:
Extract the compressed file to your site and open your site.

You will be redirected to the installation page. Complete the installation, and after finishing, you need to run the following command:

http://yourwebsite/storage-link
And you will see white page with (0) number that mean works
 


Add these two links to the cronjob (Every 3 min):

Every 1 or 2 minutes as you like:
curl "http://yourwebsite/schedule-run" >/dev/null 2>&1

And Every 1 or 2 minutes:
curl "http://yourwebsite/blast-start" >/dev/null 2>&1
 

 

You can now start Node.js using aaPanel, cPanel, or SSH for this path:

/yoursitepath/whatsapp/server.js
 


My advice for (VPS & aaPanel) users:
Install PM2.js on your server and run the WhatsApp server through it. This will make your version stable without disconnections. PM2.js automatically reconnects when the script stops and provides a link to monitor all issues, restart, and other information such as CPU status and bandwidth used by the script remotely.
 

npm install pm2@latest -g
# OR
yarn global add pm2

Start your whatsapp server:
pm2 start server.js
 



You can check if the WhatsApp server is running by going to your site and navigating to Admin -> Settings Server. There, you will find a new feature that displays the port status. If it is green, it is running; if it is red, it is not running.


image.thumb.png.31001e1548d17d70b68d635e40e52bcd.png

 

Installation is complete, and you can use the site...

Here is the list of additions and fixes in this version:
-
Adding ChatGPT Bot
-
Adding the 2FA (two-factor authentication) feature.
-
Adding Rcovery Codes (Login)
-
Adding VCard message
-
Adding VCard message API and api-docs
-
Adding the location message feature.
-
Adding location message API and api-docs
-
Adding the feature to create a new user via API.
-
Adding the (message read) feature, which can be enabled or disabled from the control panel.
-
Adding 3 Themes (semi-dark | light-theme | dark-theme)
- Adding check whatsapp server port
-
Fixing Connect Via Code
-
Fixing the connection issue.
-
Fixing the timeout issue.
-
Fixing the logout issue.
-
Fixing the list message issue.
-
Fixing the poll message issue.
-
Fixing template message API (input correct format)
-
Fixing the issue with (Waiting for this message. Check your phone).
-
Fixing the fetching of non-English group names.
-
Fixing the fetching of groups from the phone.
-
Fixing the autorply issue.
And more...

wpma-magd-v7.0.0.1.zip 77.81 MB · 91 downloads

@Magd Almuntaser how can I see - Adding the (message read) feature, which can be enabled or disabled from the control panel.

  • DW Members
10 hours ago, Renato Oliveira Fotografia said:

QR code not working. server.js started. Node 20, Port (3100)…

 

Anything else to be done?

Captura de Tela 2024-08-04 às 15.10.46.png

Captura de Tela 2024-08-04 às 15.11.24.png

Captura de Tela 2024-08-04 às 15.10.58.png

Because you're using https on your URL, and you're using Nodejs without ssl, how will mix work?
You must use your site without ssl for it to work. Or install ssl as explained in my previous post on page number 43 about:
How To Run (Whatsapp Gateway Multi Device) Via SSL
(For All Version)
((aaPanel))

or page number 40 about:
How To Run (Whatsapp Gateway Multi Device) Via SSL
(For All Version)
((Cpanel+Cloudflare))

9 hours ago, The Billionaire said:

@Magd Almuntaser from what I can see is only when they set auto replay meaning they can enable the read for the auto-reply, I want it to work everywhere because I am using the webhook to interact

Yes, that's what I thought later after uplodaing my version, why didn't I put a read feature on all messages? I'll do it in the next version.

  • Like 1
  • DW Members
44 minutes ago, nikokenzo said:

@Magd Almuntaser Can you also add feature for Auto Reject call on next release?(which can activate or No on Web Panel.)

Because sometimes people makes annoying calling whatsapp bot number.

I wish this feature existed, but unfortunately whatsapp web does not receive calls. As I said before, any feature that does not exist in web.whatsapp.com will not be present in this script because the script uses whatsapp.js used in web.whatsapp.com, so the ability to receive, call, reject or accept the call is limited to IOS, android, app only.

5 hours ago, Magd Almuntaser said:

I wish this feature existed, but unfortunately whatsapp web does not receive calls. As I said before, any feature that does not exist in web.whatsapp.com will not be present in this script because the script uses whatsapp.js used in web.whatsapp.com, so the ability to receive, call, reject or accept the call is limited to IOS, android, app only.

Ok sir. 🫡

  • DW Members
35 minutes ago, agus amin said:

ada yang berhasil dengan chat GPT, bagaimana cara menggunakannya setelah set API Keynya

 

ChatGPT bekerja normal, tetapi kamu harus membayar 5 dolar kepada perusahaan agar bisa bekerja untukmu, atau gunakan Gemini yang gratis. Lihat postinganku sebelumnya di halaman sebelumnya dan ganti file tersebut agar Gemini bisa bekerja untukmu.

9 hours ago, nikokenzo said:

@Magd AlmuntaserBisakah Anda juga menambahkan fitur untuk Tolak Panggilan Otomatis pada rilis berikutnya? (yang dapat diaktifkan atau Tidak pada Panel Web.)

Karena terkadang ada orang yang melakukan panggilan nomor bot whatsapp yang menyebalkan.

Aku akan bantu membuatnya untuk script ini..
karena saya juga membuatnya pada script saya dan berjalan dengan baik..

  • DW Members
43 minutes ago, Dammah Sifla said:

Aku akan bantu membuatnya untuk script ini..
karena saya juga membuatnya pada script saya dan berjalan dengan baik..

Laporan panggilan sebenarnya muncul saat panggilan dilakukan, tetapi sangat sulit untuk menanganinya karena laporan yang ditampilkan pada gambar di bawah ini berasal dari socket perusahaan WhatsApp, bukan dari WhiskeySockets/Baileys. Jadi, kamu tidak bisa menangani socket perusahaan WhatsApp kecuali tim WhiskeySockets/Baileys yang membuatnya, atau kamu mengubah file mereka di GitHub dan membuat build versi tersebut. Namun, versi terbaru dari WhiskeySockets/Baileys tidak kompatibel dengan skrip ini dan membutuhkan perubahan total pada skrip.

Jadi, situasinya saat ini sangat sulit dan tidak akan berhasil untukmu. Tetapi saya harap kamu berhasil, karena ini adalah fitur yang hebat bagi mereka yang memiliki nomor bot.

image.png.9e5e98f49ae62246cc202443bfb68a2d.png

  • Like 1
  • DW Members
10 minutes ago, agus amin said:

@Magd Almuntaser gimana cara agar gemini tidak menjawab otomatis ke group whatsapp, kemudian tolong perbaiki api key gemini/chat gpt user tidak bisa menyimpan otomatis ke database di mpwa, kalau admin bisa menyimpan, untuk user belum

Saya tidak berpikir bahwa Gemini dan ChatGPT akan memposting di grup, saya lupa tentang poin ini. Mengenai ketidakmampuan pengguna untuk menyimpan secara otomatis ke database, saya akan memeriksanya.
Secara umum, saya akan menerapkan perbaikan ini pada versi berikutnya.

  • Like 1
  • Love 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...