Jump to content
Bicrypto v4.6.0 + All Plugins
Posted
  • Popular Post
comment_35854

Whatsapp Gateway | Multi Device


This script has been completely modified and many important features and fixes have been added by @Magd Almuntaser
He is now responsible for the updates of this script and has full intellectual property rights
So no one will violate the terms of use that he has set

Latest Features:
1. WhatsApp Account Connectivity

All types of WhatsApp Accounts to be able to connect with WhatsApp Gateway (Multi Number & Multi Device);
Ease of the WhatsApp Account connectivity process with a QRcode Scan or with an Authentication Code directly from your device.

2. Message

Availability of various types of (text messages, media, polls, lists, locations, VCard) can easily be used by you;
You can send mass messages for your marketing campaign activities, promotions or business programs easily and on a scheduled basis;
Setup automatic message replies with more natural (alami) and selected keywords for operational optimization of use;
Manage sent message history with automatic and scheduled deletions.

4. Integration

You can easily integrate your WhatsApp Account with various (AI) artificial intelligence services, namely ChatGPT, DALL-E, Gemini, and Cloude with API authentication codes only;
You can easily activate Ai for Single or Multiple use on your WhatsApp Account;
You can easily select Ai in your WhatsApp messages for WhatsApp Group, Private, or Both types;
You can easily setup call rejection automatically if there is a (Call) call and provide a specific response or information;
Setup your WhatsApp and Ai accounts more naturally (alami) with "Already read" status";
Setup your WhatsApp and Ai accounts more naturally (natural) with the status "Typing...".
You can easily integrate and communicate your services with the Webhook mechanism of WhatsApp Gateway | Multi Device.

5. Application Settings

Nowadays you can easily and quickly carry out the process of setting up the WhatsApp Gateway | Multi Device* application by Magd Almuntaser with the settings panel;
You can easily set up applications based on server ecosystem, smtp, etc quickly;
Multi language support (english, Indonesian, Indian, Spanish and Arabic) for easy use.

6. Developer Options

Currently WhatsApp Gateway | Multi Device* by Magd Almuntaser has provided various API services for your easy development consisting of:
        1). Send Message API
        2). Send Media API
        3). Send Poll API
        4). API Send Button
        5). Send API Templates
        6). Send List message API
        7). Send Location API
        8). Send VCard API
        9). Generate QR API
        10). Disconnect devices
        11). Create User API
        12). User Info API
        13). Device Info API
        14). Check Number API
        15). Webhook Example

Ease of setup and availability of the (API Key) API Key for authentication and authorization of your development process.

7. Security

Currently there is a 2 factor authentication (2FA) service available to maintain the security and comfort of application access;
A password reset service is available if you forget your account login information.


Coming Soon:

1. Landing page for Software as Service services (Subscription Services);
2. Payment gateway page management (QRIS, BCA virtual account, PayPal, Stripe);
3. Added user account management;
4. (ticket) obstacle reporting service for users and managers;
.. And many more.


Whatsapp Gateway | Multi Device

  • Replies 4.5k
  • Views 282.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Magd Almuntaser
    Magd Almuntaser

    What's new so far in version 9.0.0: - Added landing page (welcome page). - Added plans system. - Added Manage Languages system. - Added (landing page) edit page. - Added ticket system. - Added cronjob

  • Magd Almuntaser
    Magd Almuntaser

    What's new so far in version 9.0.0: - Added Landing page (Homepage). - Added Plans System. - Added Manage Payment gateways. - Added Manage Languages system. - Added (Homepage) edit page. - Added Ticke

  • Magd Almuntaser
    Magd Almuntaser

    What's new in version 9.0.0 so far: - Added landing page (welcome page). - Added plans system. - Added cronjob page. - Added Multi-Keyword in autoreply. - Added send message with footer. -

Posted Images

Featured Replies

  • Author
comment_56678
7 minutes ago, SHIEVIP said:

@Magd Almuntaser When i try send message and show error like this

Screenshot (285).png


your website disable eval function .. so you need to decode all files that encoded.. i decoded this two files for you.
so first if you use 5.5.0 you can replace this file inside this file (app/Services/Impl/WhatsappServiceImpl.php) :
 

<?php
  

namespace App\Services\Impl;

use App\Services\WhatsappService;
use Illuminate\Support\Facades\Http;

class WhatsappServiceImpl implements WhatsappService {

  private $url;
  

  public function __construct()
  {
    $this->url = env('WA_URL_SERVER');
  }
  public function fetchGroups($device): object
  {
        $fetch = Http::withOptions(['verify' => false])->asForm()->post($this->url .'/backend-getgroups',['token' => $device->body]);
        return json_decode($fetch->body());

  }

  public function startBlast($data): object
  {
    $res = Http::withOptions(['verify' => false])
    ->asForm()
    ->post(
        $this->url . '/backend-blast',
        [
            'data' => json_encode($data),
            'delay' => 1,
        ]
    );
    return json_decode($res->body());
  }

  public function sendText($request,$receiver): object | bool
  {
     $results = Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-text', [
          'token' => $request->sender,
          'number' =>$receiver,
          'text' => $request->message,
    ]);

    return json_decode($results->body());

  }


  public function sendMedia($request,$receiver): object | bool
  {
    // GET FILE NAME from $request->url
    $fileName = explode('/', $request->url);
    $fileName = explode('.', end($fileName));
    $fileName = $fileName[0];
 
     $data = [
            'token' => $request->sender,
            'url' => $request->url,
            'number' => $receiver,
            'caption' => $request->caption ?? '',
            'filename' => $fileName,
            'type' => $request->media_type,
            'ptt' => $request->ptt ? ($request->ptt == 'vn' ? true : false) : false,
        ];
    $results = Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-media', $data);


    return json_decode($results->body());
  }


  public function sendButton($request,$receiver): object | bool
  {
       $buttons = [];
       foreach ($request->button as $button) {
            $buttons[] = ['displayText' => $button, ];
        }
        // check url if exists,set to image if not exists cheeck thumbnail if exists set to image
        $image = $request->url ? $request->url : ($request->image ? $request->image : '');
        $data = [
            'token' => $request->sender,
            'number' => $receiver,
            'button' => json_encode($buttons),
            'message' => $request->message,
            'footer' => $request->footer ?? '',
            'image' => $image,
        ];
;
        $results =  Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-button', $data);
        return json_decode($results->body());

  }

  public function sendTemplate($request,$receiver): object | bool
  {
         $templates = [];

         $ii = 1;
          foreach ($request->template as $template) {
            $ii++;
            $typedest = explode('|', $template)[0] == 'url' ? 'url' : (explode('|', $template)[0] == 'call' ? 'phoneNumber' : 'id');
            $type = explode('|', $template)[0] == 'id' ? 'quickReplyButton' : explode('|', $template)[0] . 'Button';
            $templates[] = [
                'index' => $ii,
                $type => [
                    'displayText' => explode('|', $template)[1],
                    $typedest => explode('|', $template)[2],
                ],
            ];
        
            }
             $image = $request->url ? $request->url : ($request->image ? $request->image : '');
            $data = [
            'token' => $request->sender,
            'number' => $receiver,
            'button' => json_encode($templates),
            'text' => $request->message,
            'footer' => $request->footer ?? '',
            'image' => $image,
            
        ];

        $results =  Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-template', $data);
        return json_decode($results->body());
  }


  public function sendList($request,$receiver) : Object | bool
  {
     $section['title'] = $request->title;
      $i = 1;
      foreach ($request->list as $menu) {
            $i++;
            $section['rows'][] = [
                'title' => $menu,
                'rowId' => 'id' . $i,
                'description' => '',
            ];
        }
       $data = [
            'token' => $request->sender,
            'number' => $receiver,
            'list' => json_encode($section),
            'text' => $request->message,
            'footer' => $request->footer ?? '',
            'title' => $request->title,
            'buttonText' => $request->buttontext,
        ];


        $results =  Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-list', $data);
        return json_decode($results->body());

  }

  public function sendPoll ($request ,$receiver) : Object | bool
  {
    $optionss = [];
    foreach ($request->option as $opt) {
       $optionss[] = $opt;
  }
 
 
    $data = [
      "token" => $request->sender,
      "number" => $receiver,
      "name" => $request->name,
      "options" => json_encode($optionss),
      "countable" => $request->countable === "1" ? true : false,
    ];

    $results = Http::withOptions(['verify' => false])->asForm()->post($this->url . '/backend-send-poll', $data);
    return json_decode($results->body());

  }
}
?>


and replace this code with (app/Services/Impl/MessageServiceImpl.php) :
 

<?php
  

namespace App\Services\Impl;

use App\Services\MessageService;

class MessageServiceImpl implements MessageService
{
    public function formatText($text): array
    {
        return ['text' => $text];
    }

    public function formatImage($url, $caption = ''): array
    {
        return ['image' => ['url' => $url], 'caption' => $caption];
    }

    // formating buttons
    public function formatButtons($text, $buttons, $urlimage = '', $footer = '' ): array 
    {
        $optionbuttons = [];
        $i = 1;
        foreach ($buttons as $button) {
            $optionbuttons[] = [
                'buttonId' => "id$i",
                'buttonText' => ['displayText' => $button],
                'type' => 1,
            ];
            $i++;
        }
        $valueForText = $urlimage ? 'caption' : 'text';
        $message = [
            $valueForText => $text,
            'buttons' => $optionbuttons,
            'footer' => $footer,
            'headerType' => 1,
        ];
        if ($urlimage) {
            $message['image'] = ['url' => $urlimage];
        }
        return $message;
    }

    // formating templates
    public function formatTemplates( $text,$buttons, $urlimage = '', $footer = ''): array 
    {
        $templateButtons = [];
        $i = 1;
        foreach ($buttons as $button) {
         
            $type = explode('|', $button)[0] . 'Button';
            $textButton = explode('|', $button)[1];
            $urlOrNumber = explode('|', $button)[2];
            $typeIcon = explode('|', $button)[0] === 'url' ? 'url' : 'phoneNumber';
            $templateButtons[] = [
                'index' => $i,
                $type => ['displayText' => $textButton, $typeIcon => $urlOrNumber],
            ];
            $i++;
        }
        $valueForText = $urlimage ? 'caption' : 'text';
        $templateMessage = [
            $valueForText => $text,
            'footer' => $footer,
            'templateButtons' => $templateButtons,
            'viewOnce' => true,
        ];
        //add image to templateMessage if exists
        if ($urlimage) {
            $templateMessage['image'] = ['url' => $urlimage];
        }
        return $templateMessage;
    }

    public function formatLists ($text,$lists,$title,$name,$buttonText,$footer = '') : array
    {
         $section = [
                    'title' => $title,
                ];
                $i = 1;
                foreach ($lists as $menu) {
                    $i++;
                    $section['rows'][] = [
                        'title' => $menu,
                        'rowId' => 'id' . $i,
                        'description' => '',
                    ];
                }

                $listMessage = [
                    'text' => $text,
                    'footer' => $footer,
                    'title' => $name,
                    'buttonText' => $buttonText,
                    'sections' => [$section],
                    'viewOnce' => true,
                ];

          return $listMessage;
    }



    public function format ($type, $data) : array
    {
         switch ($type) {
            case 'text':
                $reply = $this->formatText($data->message);
                break;
            case 'image':
                $reply = $this->formatImage($data->image,  $data->caption );
                break;
            case 'button':
                $buttons = [];
                foreach ($data->button as $button) {
                    $buttons[] = $button;
                }
                $reply = $this->formatButtons( $data->message,$buttons,$data->image ? $data->image : '',$data->footer ?? '' );
                break;
            case 'template':
                $buttons = [];
                foreach ($data->template as $button) {
                    $buttons[] = $button;
                }
                try {
                    $reply = $this->formatTemplates(  $data->message,$buttons, $data->image ? $data->image : '',$data->footer ?? ''
                    );
                } catch (\Throwable $th) {
                   throw new \Exception('Invalid button type');
                }

                break;
            case 'list':
                $reply = $this->formatLists($data->message,$data->list,$data->title,$data->name,$data->buttontext,'');

                break;
            default:
                # code...
                break;
        }

        return $reply;
    }
}

?>


after that you try again to send msg if there is error screenshot to know what is the other files need decoded.

comment_56681
On 8/10/2023 at 9:50 PM, Micro Creatives said:

Autoreply notworking since i installed, other features is working fine but only autoreply notworking ? i used shared hosting

Hi friend

Seems like an isolated issue with autoreply after installation. Shared hosting might be a factor. Check plugin settings and hosting compatibility for a quick fix.

 

Quote

 

 

 

 

Edited by Clarar

  • Author
comment_56684
1 hour ago, Clarar said:

Hi friend

Seems like an isolated issue with autoreply after installation. Shared hosting might be a factor. Check plugin settings and hosting compatibility for a quick fix.

 

 

The problem when your friend send msg the format is:
{"text":"Hello World"}

the correct is:
{text:"Hello World"}

becouse the (text) is object not string.. so to fix the problem you can see my old reply

Edited by Magd Almuntaser

  • Author
comment_56685
11 minutes ago, SHIEVIP said:

@Magd Almuntaser still error sir

Screenshot (286).png

yes i know it's still not working becouse you don't replace what i give you in old reply

i've sent to you (2) files you should replace the two files
you forget MessageServiceImpl.php

so back to my old reply and replace the correct files

comment_56717
16 hours ago, Magd Almuntaser said:

Ok guys i've decoded all files in this script and fixed most errors like autoreply and others..
you can download from here:

 

mediafire .com/file/i61pnpkx3qj5an5/whatsapp-gateway-multi-device-v5.5.0-decoded.zip/file

remove space from link.

nice bro. ty so much. it work for autoreply. i hope other bug too.

  • Author
comment_56768
1 hour ago, Zero828 said:

@Magd Almuntaser broken link sir

i've change the link:
easyupload .io/3j7cjg
remove space.

1 hour ago, divysriv said:

@Magd Almuntaser when I select test message, under type message, no option is visible to write messages IMG_20230820_105000.thumb.jpg.d1f01457a674f9eb7710a65d369b8610.jpg

becouse you open the script from /public/home
you should open it from the root like:
ws.yoursite.com/home

comment_56770
1 hour ago, divysriv said:

@Magd Almuntaser when I select test message, under type message, no option is visible to write messages IMG_20230820_105000.thumb.jpg.d1f01457a674f9eb7710a65d369b8610.jpg

check your .htaccess it should like this

 

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

 

comment_56772
38 minutes ago, Magd Almuntaser said:

i've change the link:
easyupload .io/3j7cjg
remove space.

becouse you open the script from /public/home
you should open it from the root like:
ws.yoursite.com/home

Thanks bro it's fixed but when I click on the send error pop on saying

 

App\Services\Impl\WhatsappServiceImpl::sendText(): Return value must be of type object|bool, null returned

  • Author
comment_56774
16 minutes ago, divysriv said:

Thanks bro it's fixed but when I click on the send error pop on saying

 

App\Services\Impl\WhatsappServiceImpl::sendText(): Return value must be of type object|bool, null returned

can you screenshot your command (node .) to see the log what exactly the error.
and whats your nodejs version

  • Author
comment_56779
28 minutes ago, ashoksingh shekhawat said:

@Magd Almuntaser Sir templete , list and button messages are not working in android device please provide any solution for it.

there is no solution .. the problem from whatsapp
github .com/WhiskeySockets/Baileys/issues/25
and
github .com/WhiskeySockets/Baileys/issues/56

this script using WhiskeySockets to send and recive the msg so no solution..

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

Recently Browsing 2

Latest Updated Files