Jump to content
Bicrypto v4.4.2 + All Plugins ×

Whatsapp Gateway | Multi Device v8.5.1


Magd Almuntaser

Recommended Posts

32 minutes ago, Enno The Explorer said:

cronjob akan berjalan dengan optimal di settingan 5 menit sekali atau akan super otimal di 1 menit sekali

saya sudah mencoba di setiap 5 menit namun hasil masih tetap sama pada server saya ^_^
entah mungkin ada yang kurang dalam saya setting nya

Link to comment
Share on other sites

19 minutes ago, MURASAKI. said:

What if another time stop. lets say on 03.00 AM, you must see the log and setup again, again, again with time the apps stopped. The issue disconected for bussiness is so annoying sometimes.

But this temporary solution for issue disconnected and posible to do it. Thanks

I do it too, but issue still come and node always stopped. And must delete the history "Test Cronjob" everyday.

sejauh ini masalah dalam percobaan saat
karena setiap jam 00:00 lebih node js saya berhenti, tapi setiap saya restar docker saya berjalan normal kembali sampai pukul 00 lebih
saya kan coba pantau selama dalam percobaan pada server saya

Link to comment
Share on other sites

14 minutes ago, Shahriar24 said:

I need to use unicode

Want to use me?

no you cant

1 hour ago, Ade Prastia said:

saya sudah mencoba di setiap 5 menit namun hasil masih tetap sama pada server saya ^_^
entah mungkin ada yang kurang dalam saya setting nya

Punya saya aman hehe.

meskipun saya coba kirim ke nomor yg tidak valid hasilnya failed. Namun tetap membuat nodejs bekerja

  • Haha 1
Link to comment
Share on other sites

  • DW Members
3 minutes ago, Magd Almuntaser said:

send button..
send list..
sendt template..

I think I will look for another library 🤦‍♂️

i think i will try today this library :
wppconnect-team/wppconnect
It looks very beautiful

 

2 minutes ago, Shahriar24 said:

can you please help i cant send unicode msg

Yes but what do you use? Do you use php? Or use the link directly?

If you are using php you can use it like this:

<?php
function SendWhatsApp($sender_number, $api_key, $number, $text) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, 'http://yourwebsite.com/send-message?api_key='.$api_key.'&preview_url=true&sender='.$sender_number.'&number='.$number.'&message='.urlencode($text).'');
	curl_setopt($ch, CURLOPT_HEADER, FALSE);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($ch);
	curl_close($ch);
		$result = str_replace("      ", "", $result);
    
	if($result){
		return $result;
	}else{
		return "";
	}
}
// "yournumber", "api key", "recierv number", "msg"
echo SendWhatsApp("62888xxxx", "nknfkl345ksdfk4KLhk45", "6281xxxxxx", "Hello World");
?>

 

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Magd Almuntaser said:

i think i will try today this library :
wppconnect-team/wppconnect
It looks very beautiful

 

Yes but what do you use? Do you use php? Or use the link directly?

If you are using php you can use it like this:

<?php
function SendWhatsApp($sender_number, $api_key, $number, $text) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, 'http://yourwebsite.com/send-message?api_key='.$api_key.'&preview_url=true&sender='.$sender_number.'&number='.$number.'&message='.urlencode($text).'');
	curl_setopt($ch, CURLOPT_HEADER, FALSE);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($ch);
	curl_close($ch);
		$result = str_replace("      ", "", $result);
    
	if($result){
		return $result;
	}else{
		return "";
	}
}
// "yournumber", "api key", "recierv number", "msg"
echo SendWhatsApp("62888xxxx", "nknfkl345ksdfk4KLhk45", "6281xxxxxx", "Hello World");
?>

 

i want to use direct api link

Link to comment
Share on other sites

  • DW Members
1 minute ago, Shahriar24 said:

i want to use direct api link

Currently you can't use multiple lines of unicode without using urlencode.. but in the next release I can fix this problem so that it will be supported..
but for now you can first convert your text to urlencode by using this site then send it:

www.urlencoder.org

Put the text and press ENCODE and copy the new text and put it in the link

Link to comment
Share on other sites

13 minutes ago, Magd Almuntaser said:

i think i will try today this library :
wppconnect-team/wppconnect
It looks very beautiful

 

Yes but what do you use? Do you use php? Or use the link directly?

If you are using php you can use it like this:

<?php
function SendWhatsApp($sender_number, $api_key, $number, $text) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, 'http://yourwebsite.com/send-message?api_key='.$api_key.'&preview_url=true&sender='.$sender_number.'&number='.$number.'&message='.urlencode($text).'');
	curl_setopt($ch, CURLOPT_HEADER, FALSE);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	$result = curl_exec($ch);
	curl_close($ch);
		$result = str_replace("      ", "", $result);
    
	if($result){
		return $result;
	}else{
		return "";
	}
}
// "yournumber", "api key", "recierv number", "msg"
echo SendWhatsApp("62888xxxx", "nknfkl345ksdfk4KLhk45", "6281xxxxxx", "Hello World");
?>

 

yups, WppConnect looks better and more complete, also supports multi channels 👍

Link to comment
Share on other sites

11 hours ago, Magd Almuntaser said:

So I will dispense with Baileys .. and I will use another library .. The situation is exhausting but I will not give up ..
So far I have been able to completely reprogram the sending system, but I am trying it now, there is a lack of many codes in the pedroslopez/whatsapp-web.js library, but I am trying to rebuild it .. And I actually tried sending a message and the notification reached my phone and also the response was from the autoreply, which means that Baileys is facing many problems ..
And also the good news is that so far 6 hours have passed since I rebuilt the sending system and the connection has never been disconected, even if errors appear, it does not disconnect 😍

Also I tried turning off the modem and waiting 5 minutes and then turning the internet back on again and it connected automatically thanks to the isOnline library it is very compatible with pedroslopez/whatsapp-web.js 😍
So I will say goodbye Baileys and hello whatsapp-web.js but there may be some features that will stop 🥲.. I am still developing the system and I will not give up.

its good thing we here today, keep spirit for our brother @Magd Almuntaser to rebuild this app, so wee keep behind you sir,

Link to comment
Share on other sites

1 hour ago, Magd Almuntaser said:

Currently you can't use multiple lines of unicode without using urlencode.. but in the next release I can fix this problem so that it will be supported..
but for now you can first convert your text to urlencode by using this site then send it:

www.urlencoder.org

Put the text and press ENCODE and copy the new text and put it in the link

image.png.1ae069dcf59d9b30cd8165a109f24a39.png

still same issue

Link to comment
Share on other sites

2 minutes ago, Enno The Explorer said:

ini jug bagus idenya, kirim cronjob ke nomor yang tidak pernah ada didunia ini 🤣

🤣🤣 coba saja.
Sepertinya tugas kita hanya membuat nodejs sibuk dan tetap terbangun.

tapi saya sarankan memakai nomor yang tidak digunakan sebagai bot untuk ping.

karena kadang autoreply bot dan Ai akan tidak bekerja pada nomor yang digunakan untuk spam ping tersebut.

Edited by Unicode
Link to comment
Share on other sites

On 8/25/2024 at 5:22 PM, Gusik Prasetyo said:

this tutorial to make MPWA autoreply using google sheet plus apps script.

1. make new sheet file using this format (1st row) Keyword, Type, Message, File

you can visit:

https://docs.google.com/spreadsheets/d/1svHPPF3hFyaPfkRxzN1wscR5A5bS21MzcjrH3NO51us/edit?usp=sharing

wsheet.jpg.b1a25516ac39374325eba53c0b89909e.jpg

 

2. then go to Extensions - Apps Script

appsscript.jpg.6ed7295ddac47fc78a363f1d113e9957.jpg

 

3. delete all data on there. copy and paste code bellow. and edit with your own data.

 

function doPost(e) {
    var data =  e.postData.contents;
    var json = JSON.parse(data);
    var number = json['from'];
    var senderMessage = json['message'];
    var file = json['bufferImage'];
    var pesan = senderMessage.toLowerCase();
    var newMessage = pesan.split(" ");
    var searchreply = autoreply(newMessage[0]);
    var type = searchreply[1];
    var messagetosend = searchreply[2];
    var file = searchreply[3];
    if(type == "file"){
        sendWaFile(number, messagetosend, file);
    } else if(type == "button") {
        sendWaButton(number, messagetosend, file);
    } else if(type == "list") {
        sendWaList(number, messagetosend, file);        
    } else {
        sendWaText(number, messagetosend);
    }
}
 
function autoreply(message){
  var sheetUrl = "https://docs.google.com/spreadsheets/d/1svHPPF3hFyaPfkRxzN1wscR5A5bS2jsdhjsdhuheheh/edit?usp=sharing"; //ganti dengan URL sheet kamu
  var sheetfile = SpreadsheetApp.openByUrl(sheetUrl);
  var sheet = sheetfile.getSheetByName("autoreply"); //sesuaikan dengan nama sheet yg d buat
  var data = sheet.getDataRange().getValues()
  var filterData = data.filter(function(keyword){
    if(keyword[0] == message){
      return keyword
      }        
    })
    if(filterData.length>0){
        return filterData[0]
    }
}
 
function sendWaText(number, messagetosend) {
  var APIKey = "Hcu8aDaGnxI6Utf9kWjQsjlpX5taFy" //ganti dengan API
  var sender = "628xxxxxxxxxx"  // ganti nomer HP
  var url = "https://websitekamu/send-message"; //ganti website
  var msgtext = {
    'api_key': APIKey,
    'sender': sender,
    "number": number,
    'message': messagetosend,
    };
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msgtext),
      });
    Logger.log(response.getContentText());
}
 
//untuk kirim file
function sendWaFile(number, messagetosend, file){
  var APIKey = "Hcu8aDaGnxI6Utf9kWjQsjlpX5taFy" //ganti api
  var sender = "628000000000" // ganti nomer HP
  var url = "https://websitekamu/send-media"; //ganti website
  var msggmbr = {
    "api_key": APIKey,
    "sender": sender,
    "number": number,
    "media_type" : "image",
    "caption": messagetosend,
    "url": file
    }
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msggmbr),
      });
    Logger.log(response.getContentText());
}
 
//fungsi button tidak bisa
//http://yourhost.com/send-button?sender=nomersender&api_key=yourapikey&number=nomertujuan&url=&footer=optional&message=Halo,ini pesan button&button=button 1,button 2,button 3
function sendWaButton(number, messagetosend, file){
  //var APIKey = "blablabla"
  //var sender = "blablabla"
  var url = "https://alamatwebsite/send-button";
  var msgbut = {
    "sender" : sender,
    "api_key" : APIKey,
    "number" : number,
    "url" : null,
    "footer" : "optional",
    "message" : messagetosend,
    "button" : file
    }
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msgbut),
    });
    Logger.log(response.getContentText());
}

 

4. in left menus, choose Triggers

triggers.jpg.cf553ed27faf0ebcc6e40f9dffd666e5.jpg

 

5.  Click Add Trigger button in right bottom corner.

6.  make setting like picture bellow. click SAVE.

addtriger.jpg.053a6e898130aefe117adc67f4b4b4e7.jpg

 

7. Click DEPLOY in right top corner.

8. Select type: WEB APP. and make setting like picture. Click DEPLOY to finish it.

autowebhook.jpg.e2e67fa05cab4a05cba124d11bf07979.jpg

 

9. copy url and paste in your MPWA webhook. 

copyurl.jpg.581873383fcb7afc4a375c106be29699.jpg

 

 

@Enno The Explorer @JangE  thanks to @bloserda who teach me about this script.

mas gusik, saya coba membuatnya tapi kok tidak bekerja ya?

apa yang salah?

nomor sudah disetting baru semua tanpa Ai dll.

sudah mengikuti form juga.

 

 

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

 

Revisi: sudah bisa bekerja. ternyata keyword harus ditulis dalam huruf kecil ya? 😁

Edited by Unicode
Link to comment
Share on other sites

23 minutes ago, Enno The Explorer said:

ini jug bagus idenya, kirim cronjob ke nomor yang tidak pernah ada didunia ini 🤣

 

21 minutes ago, Unicode said:

🤣🤣 coba saja.
Sepertinya tugas kita hanya membuat nodejs sibuk dan tetap terbangun.

tapi saya sarankan memakai nomor yang tidak digunakan sebagai bot untuk ping.

karena kadang autoreply bot dan Ai akan tidak bekerja pada nomor yang digunakan untuk spam ping tersebut.

LoL, the true logic. haha
---
but it worted to tested and wake up the enod js every fuc*ing time. haha

Link to comment
Share on other sites

1 minute ago, Gusik Prasetyo said:

Apakah sudah d pasang triggernya?

Tidak terkirim? Pesan log nya apa mas?

sudah bisa mas itu ternyata penulisan keyword harus huruf kecil semua ya di spreadsheetnya?

tadi aku tulis dengan huruf kapital semua jadi gk work.

Mantap mas. mau coba pake webhook aja autoreplynya karena kadang entah kenapa dari mpwa macet autoreplynya

  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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