kejarkoding / whatsapp-gateway
使用 Whatsapp API 来简化消息管理和发送
1.0.1
2024-08-06 02:24 UTC
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-06 02:36:05 UTC
README
使用免费号码发送 WhatsApp 消息以发送通知
安装
此项目使用 composer。
$ composer require kejarkoding/whatsapp-gateway
用法
发送文本消息。
<?php require './vendor/autoload.php'; use Kejarkoding\WhatsappGateway\Whatsapp; $config = [ "client_key"=>"6dHL72Ty", "secret_key"=>"01rA9cifx33XnL7C" ]; $receiver = "62895361034833"; $otp_code = "123456"; $whatsapp = new Whatsapp($config); echo $whatsapp->sendMessage($receiver,$otp_code);
获取配置
客户端密钥和密钥都是必需的。要获取它,我们必须在 https://kejarkoding.com 注册