Magd Almuntaser Posted July 18 Author Posted July 18 (edited) Create User API (v1.0.0) I have programmed the create user API plugin so you can use it to create a user via payment gateways or website interfaces, etc. The zip file below contains two plugins: the first is the create user API (v1.0.0) and the second is the location message (v1.5.1), as I cannot separate them since they use the same files. The installation method is easy: extract the files into the root directory of the script. There is a guide on how to use the API available on the api-docs page. Note: Only (admin) can create a new user. ==================== Saya telah memprogram plugin create user API sehingga Anda dapat menggunakannya untuk membuat pengguna melalui gerbang pembayaran atau antarmuka situs web, dll. File zip di bawah ini berisi dua plugin: yang pertama adalah create user API dan yang kedua adalah location message, karena saya tidak dapat memisahkan mereka karena mereka menggunakan file yang sama. Metode pemasangannya mudah: ekstrak file ke direktori root script. Ada panduan tentang cara menggunakan API yang tersedia di halaman api-docs. Catatan: Hanya admin dapat membuat pengguna baru. ===================== plugins.zip Edited July 18 by Magd Almuntaser 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
Magd Almuntaser Posted July 18 Author Posted July 18 On 7/16/2024 at 4:21 PM, agus amin said: Ada contoh web pembayaran user tuan, kalau bisa yang sudah include di web mpwa 7.0.0 ini You can install my plugin (create user) and use it to create a user when the user finishes paying through the payment gateway 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
The Billionaire Posted July 18 Posted July 18 1 hour ago, Magd Almuntaser said: Create User API (v1.0.0) I have programmed the create user API plugin so you can use it to create a user via payment gateways or website interfaces, etc. The zip file below contains two plugins: the first is the create user API (v1.0.0) and the second is the location message (v1.5.1), as I cannot separate them since they use the same files. The installation method is easy: extract the files into the root directory of the script. There is a guide on how to use the API available on the api-docs page. Note: Only (admin) can create a new user. ==================== Saya telah memprogram plugin create user API sehingga Anda dapat menggunakannya untuk membuat pengguna melalui gerbang pembayaran atau antarmuka situs web, dll. File zip di bawah ini berisi dua plugin: yang pertama adalah create user API dan yang kedua adalah location message, karena saya tidak dapat memisahkan mereka karena mereka menggunakan file yang sama. Metode pemasangannya mudah: ekstrak file ke direktori root script. Ada panduan tentang cara menggunakan API yang tersedia di halaman api-docs. Catatan: Hanya admin dapat membuat pengguna baru. ===================== plugins.zip 24.77 kB · 0 downloads @Magd Almuntaser I stand to be corrected, you are making the script now bulky, i see no reason to create an API to create users ohh 1 Quote
Magd Almuntaser Posted July 18 Author Posted July 18 10 minutes ago, The Billionaire said: @Magd Almuntaser I stand to be corrected, you are making the script now bulky, i see no reason to create an API to create users ohh The create user feature is important for those who want to sell accounts for WhatsApp messages. With this api, for example anyone can create a website interface and sell an account for $50 per month. There are sites that offer these services, you can search for them, and as it seems to me that you use WhatsApp personally, but there are people who want to use it for business, Now everyone can design a website interface, connect it to a payment gateway and offer WhatsApp messaging service for a monthly fee In terms of size, the plugins are 100KB when unzipped, and the more features, the more users will be able to use the script as they wish. Also, if you do not want to use the create user feature, you can download the location message from the previous page on the latest version Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
Gusik Prasetyo Posted July 19 Posted July 19 8 hours ago, Magd Almuntaser said: Yes, I can, but my mind is starting to spin because I don't know what you will use when you have more than one webhook for the same number. You can create conditions within the webhook, for example, if the person writes "hi," make it reply with "hello," and if the person sends a file, your number responds to it. Create conditions within the webhook file, so there's no need to have more than one webhook. If I were to develop for you, you would need to specify only one webhook, or it will be chosen randomly. So, I recommend using just one. i have 3 webhooks in my drive, i wanna use them in same time in one device but in mpwa we can use only 1 webhook in one device. is it possible to use more than 1 webhook in the same time without an error? i will try to create a new condition to combine 2 webhooks into 1 , thanks for your suggestion. Quote
The Billionaire Posted July 19 Posted July 19 5 hours ago, Magd Almuntaser said: The create user feature is important for those who want to sell accounts for WhatsApp messages. With this api, for example anyone can create a website interface and sell an account for $50 per month. There are sites that offer these services, you can search for them, and as it seems to me that you use WhatsApp personally, but there are people who want to use it for business, Now everyone can design a website interface, connect it to a payment gateway and offer WhatsApp messaging service for a monthly fee In terms of size, the plugins are 100KB when unzipped, and the more features, the more users will be able to use the script as they wish. Also, if you do not want to use the create user feature, you can download the location message from the previous page on the latest version @Magd Almuntaser now i understand you, thanks for explaining Quote
The Billionaire Posted July 19 Posted July 19 @Magd Almuntaser From how you have advance this script i see we will not be needing any update from the original developer anymore well we will be giving you feedback on any error we encouter, once again thanks for all you do Quote
badas Posted July 19 Posted July 19 On 7/8/2024 at 6:50 PM, agus amin said: @Magd Almuntaser Is there a guide to installing on a VPS with Aapanel? I successfully installed on Aapanel without SSL, I want SSL, currently I already have SSL, if there are additional configurations please help Om, please help tutor how to setting node js aapanel. makasih om. Quote
Magd Almuntaser Posted July 19 Author Posted July 19 (edited) 2 hours ago, Gusik Prasetyo said: i have 3 webhooks in my drive, i wanna use them in same time in one device but in mpwa we can use only 1 webhook in one device. is it possible to use more than 1 webhook in the same time without an error? i will try to create a new condition to combine 2 webhooks into 1 , thanks for your suggestion. If you can send me your webhook i will try to combine for you becouse you don't need many webhook for one number .. 2 hours ago, The Billionaire said: @Magd Almuntaser From how you have advance this script i see we will not be needing any update from the original developer anymore well we will be giving you feedback on any error we encouter, once again thanks for all you do No problem. If the original developer updates his script, I will update my version with his updates. 1 hour ago, badas said: Om, please help tutor how to setting node js aapanel. makasih om. You can see my post on page number 40 about: How To Run (Whatsapp Gateway Multi Device) Via SSL similar to the installation method in aapanel.. If you can't, I'll install it for you and make a instracion for everyone. Edited July 19 by Magd Almuntaser Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
Bajra Al Faruq Posted July 19 Posted July 19 3 minutes ago, Magd Almuntaser said: If you can send me your webhook i will try to combine for you becouse you don't need many webhook for one number .. No problem. If the original developer updates his script, I will update my version with his updates. You can see my post on page number 40 about: How To Run (Whatsapp Gateway Multi Device) Via SSL similar to the installation method in aapanel.. If you can't, I'll install it for you and make a instracion for everyone. @Magd Almuntaser apakah kamu punya plugin untuk elementor form Quote
Gusik Prasetyo Posted July 19 Posted July 19 14 minutes ago, Magd Almuntaser said: If you can send me your webhook i will try to combine for you becouse you don't need many webhook for one number .. ok brother, let me prepare my webhooks. thanks in advance 10 minutes ago, Bajra Al Faruq said: @Magd Almuntaser apakah kamu punya plugin untuk elementor form using elementor form, you need elementor pro. and if you wanna connect your elementor form with MPWA you also need Uncanny Automator. may be @Magd Almuntaser has a different solution. Quote
badas Posted July 19 Posted July 19 35 minutes ago, Magd Almuntaser said: You can see my post on page number 40 about: How To Run (Whatsapp Gateway Multi Device) Via SSL similar to the installation method in aapanel.. If you can't, I'll install it for you and make a instracion for everyone. It was really kind of you to offer to install. check your pm bro. Quote
Magd Almuntaser Posted July 19 Author Posted July 19 7 hours ago, Bajra Al Faruq said: @Magd Almuntaser apakah kamu punya plugin untuk elementor form 7 hours ago, Gusik Prasetyo said: ok brother, let me prepare my webhooks. thanks in advance using elementor form, you need elementor pro. and if you wanna connect your elementor form with MPWA you also need Uncanny Automator. may be @Magd Almuntaser has a different solution. I haven't delved deeply into WordPress. I only install it for others, but I haven't explored it programmatically. I think there is a plugin on page 1 (Plugin MPWA WooCommerce) that I haven't used, but it might help you. ========= Saya belum mendalami WordPress. Saya hanya menginstalnya untuk orang lain, tetapi saya belum mempelajarinya secara programatis. Saya pikir ada plugin di halaman 1 (Plugin MPWA WooCommerce) yang belum saya gunakan, tetapi mungkin bisa membantu Anda. 6 hours ago, badas said: It was really kind of you to offer to install. check your pm bro. Done, you can check your website 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
badas Posted July 19 Posted July 19 15 minutes ago, Magd Almuntaser said: Done, you can check your website Thank you very much bro. you are very kind, my web works like a charm 1 Quote
agus amin Posted July 19 Posted July 19 20 minutes ago, Magd Almuntaser said: I haven't delved deeply into WordPress. I only install it for others, but I haven't explored it programmatically. I think there is a plugin on page 1 (Plugin MPWA WooCommerce) that I haven't used, but it might help you. ========= Saya belum mendalami WordPress. Saya hanya menginstalnya untuk orang lain, tetapi saya belum mempelajarinya secara programatis. Saya pikir ada plugin di halaman 1 (Plugin MPWA WooCommerce) yang belum saya gunakan, tetapi mungkin bisa membantu Anda. Done, you can check your website Tutorial Install di aapanelnya suhu Quote
Magd Almuntaser Posted July 19 Author Posted July 19 The message is read ====== Pesan dibaca oleh pengirim This is a simple modification for those who want the sender to see that you read the message at the same moment it is sent. Open the file server/controllers/incomingMessage.js at line 26 or search for: incomingData = incomingData.messages[0] Replace it with: incomingData = incomingData.messages[0] await socket.readMessages([incomingData.key]); Restart Node.js 2 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
Magd Almuntaser Posted July 19 Author Posted July 19 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 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): 5- Click on let's encrypt and make sure the File verification and Domain name are selected: 6- After pressing apply, it will automatically generate SSL on your site and after completion, go to Certificate holder and press Deploy: 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: 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'); 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: 12- Click on Certificate holder and then Deploy: 13- The following page will automatically appear, just click Save : Now you can restart Node.js and enjoy using the script over HTTPS 2 1 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
Magd Almuntaser Posted July 19 Author Posted July 19 1 hour ago, agus amin said: Tutorial Install di aapanelnya suhu 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
pak kacung Posted July 19 Posted July 19 3 hours ago, Magd Almuntaser said: The message is read ====== Pesan dibaca oleh pengirim This is a simple modification for those who want the sender to see that you read the message at the same moment it is sent. Open the file server/controllers/incomingMessage.js at line 26 or search for: incomingData = incomingData.messages[0] Replace it with: incomingData = incomingData.messages[0] await socket.readMessages([incomingData.key]); Restart Node.js terima kasih tuan...ini sangat bermanfaat, Quote
pak kacung Posted July 19 Posted July 19 (edited) 17 jam yang lalu, Magd Almuntaser berkata: Saya belum mendalami WordPress secara mendalam. Saya hanya mampir ke orang lain, tetapi saya belum menjelajahinya secara terprogram. Saya rasa ada plugin di halaman 1 (Plugin MPWA WooCommerce) yang belum saya gunakan, tapi mungkin bisa membantu Anda. ========= Saya belum mendalami WordPress. Saya hanya tertarik pada orang lain, tetapi saya belum mempelajarinya secara terprogram. Saya pikir ada plugin di halaman 1 (Plugin MPWA WooCommerce) yang belum saya gunakan, tetapi mungkin bisa membantu Anda. Selesai, Anda dapat memeriksa situs web Anda Cara instalnya bagaimana plugin ini? Edited July 20 by pak kacung Quote
Magd Almuntaser Posted July 20 Author Posted July 20 Fix Group Name For (6.x.x & 7.0.0) Reason: The developer used (preg_replace) to remove any non-English text, which is a mistake since there are people who use Arabic, Spanish, Greek, Chinese, and other languages in the group name. Solution: Remove the (preg_replace) function to avoid removing non-English characters. Open the file app/Http/Controllers/TagController.php at line 96 or search for: foreach ($respon->data as $group) { // insert to tags $namePhoneBook = $group->subject . '( ID : ' . $group->id . ' )'; $validNamePhoneBook = preg_replace('/[^a-zA-Z0-9():\s@.-]+/', '', $namePhoneBook); $tag = $request->user()->phonebooks()->firstOrCreate(['name' => $validNamePhoneBook]); foreach ($group->participants as $member) { $number = str_replace('@s.whatsapp.net','',$member->id); $cek = $request->user()->contacts()->where('tag_id',$tag->id)->where('number',$number)->count(); if($cek < 1){ $tag->contacts()->create(['user_id' =>$request->user()->id,'name' => $number,'number' => $number]); } } } And replace it with: foreach ($respon->data as $group) { // insert to tags $namePhoneBook = $group->subject . " ( ID : " . $group->id . " )"; $tag = $request->user()->phonebooks()->firstOrCreate(['name' => $namePhoneBook]); foreach ($group->participants as $member) { $number = str_replace('@s.whatsapp.net','',$member->id); $cek = $request->user()->contacts()->where('tag_id',$tag->id)->where('number',$number)->count(); if($cek < 1){ $tag->contacts()->create(['user_id' =>$request->user()->id,'name' => $number,'number' => $number]); } } } 1 Quote Update Whatsapp Gateway Multi Device (Magd Version) v8.0.0
pak kacung Posted July 20 Posted July 20 2 hours ago, Magd Almuntaser said: Perbaiki Nama Grup Untuk (6.xx & 7.0.0) Alasan: Pengembang menggunakan (preg_replace) untuk menghapus teks non-Inggris, yang merupakan kesalahan karena ada orang yang menggunakan bahasa Arab, Spanyol, Yunani, Mandarin, dan bahasa lainnya dalam nama grup. Solusi: Hapus fungsi (preg_replace) untuk menghindari penghapusan karakter non-Inggris. Buka file app/Http/Controllers/TagController.php di baris 96 atau cari : Dan menggantinya dengan: Terima kasih tuan @Magd Almuntaser sangat bermanfaat Quote
Gusik Prasetyo Posted July 20 Posted July 20 8 hours ago, Magd Almuntaser said: Fix Group Name For (6.x.x & 7.0.0) Reason: The developer used (preg_replace) to remove any non-English text, which is a mistake since there are people who use Arabic, Spanish, Greek, Chinese, and other languages in the group name. Solution: Remove the (preg_replace) function to avoid removing non-English characters. Open the file app/Http/Controllers/TagController.php at line 96 or search for: foreach ($respon->data as $group) { // insert to tags $namePhoneBook = $group->subject . '( ID : ' . $group->id . ' )'; $validNamePhoneBook = preg_replace('/[^a-zA-Z0-9():\s@.-]+/', '', $namePhoneBook); $tag = $request->user()->phonebooks()->firstOrCreate(['name' => $validNamePhoneBook]); foreach ($group->participants as $member) { $number = str_replace('@s.whatsapp.net','',$member->id); $cek = $request->user()->contacts()->where('tag_id',$tag->id)->where('number',$number)->count(); if($cek < 1){ $tag->contacts()->create(['user_id' =>$request->user()->id,'name' => $number,'number' => $number]); } } } And replace it with: foreach ($respon->data as $group) { // insert to tags $namePhoneBook = $group->subject . " ( ID : " . $group->id . " )"; $tag = $request->user()->phonebooks()->firstOrCreate(['name' => $namePhoneBook]); foreach ($group->participants as $member) { $number = str_replace('@s.whatsapp.net','',$member->id); $cek = $request->user()->contacts()->where('tag_id',$tag->id)->where('number',$number)->count(); if($cek < 1){ $tag->contacts()->create(['user_id' =>$request->user()->id,'name' => $number,'number' => $number]); } } } Awesome. Do you have plan to add OTP feature when login in MPWA? Quote
Recommended Posts
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.