Jump to content

Recommended Posts

Posted (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.

image.png.6d2270ae351a3442a23fc9b0b56bee1d.png

=====================

image.png.6b707994e634ebe01bcb595a4605c753.png

plugins.zip

Edited by Magd Almuntaser
  • Thanks 1
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.

image.png.6d2270ae351a3442a23fc9b0b56bee1d.png

=====================

image.png.6b707994e634ebe01bcb595a4605c753.png

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

  • Care 1
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

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.

 

webhoook.jpg

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

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.

Posted (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.

 

webhoook.jpg

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 by Magd Almuntaser
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 

 

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.

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.

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 👍

  • Like 1
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

The message is read
======
Pesan dibaca oleh pengirim


image.jpeg.e239320baf8102500d2c71eba3ddac0e.jpeg


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
 

  • Thanks 2
  • Care 1

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

 

  • Love 2
  • Thanks 1
  • Care 1
3 hours ago, Magd Almuntaser said:

The message is read
======
Pesan dibaca oleh pengirim


image.jpeg.e239320baf8102500d2c71eba3ddac0e.jpeg


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,

Posted (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 by pak kacung

Fix Group Name
For (6.x.x & 7.0.0)

image.jpeg.313b4ce0dbae755f281573371299ea9d.jpeg

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]);
        }
    }
}
  • Thanks 1
2 hours ago, Magd Almuntaser said:

Perbaiki Nama Grup
Untuk (6.xx & 7.0.0)

gambar.jpeg.313b4ce0dbae755f281573371299ea9d.jpeg

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

8 hours ago, Magd Almuntaser said:

Fix Group Name
For (6.x.x & 7.0.0)

image.jpeg.313b4ce0dbae755f281573371299ea9d.jpeg

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? 

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...