Coder Social home page Coder Social logo

mywaapi-php-lib's Introduction

Mywaapi PHP Lib

This is PHP library for mywaapi

Installation

Install with composer

  composer require yama/mywaapi-php-lib

Usage/Examples

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Yama\MywaapiPhpLib\Mywaapi;

$wa = new Mywaapi("http://localhost:8000/");

for send message to contact

echo $wa->sendMessage('6281292267204', 'example message');
Parameter Type Description
number string Required. 6281292267204
message string Required. example message

for information of connection

echo $wa->info();

for check the number is registered or not

echo $wa->isRegistered("6281292267204");
Parameter Type Description
number string Required. 6281292267204

for set the webhook/callback

echo $wa->setWebhook("https://webhook.site/365b1f55-5334-48e0-8380-91443516515b");
Parameter Type Description
url string Required. webhook url

for get the webhook/callback

echo $wa->getWebhook();

for send media to contact or group

echo $wa->sendMedia('6281292267204', 'example media caption', "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/479px-WhatsApp.svg.png");
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)
caption string example media caption (you can fill with empty string)
file string Required. (you can fill it with base64 url data)

for send message to group

echo $wa->sendGroupMessage('[email protected]', 'example group message');
Parameter Type Description
id string Required. [email protected]
message string Required. example group message

for clear all message in the chat

echo $wa->clearMessage('6281292267204');
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)

for delete chat

echo $wa->deleteChat('6281292267204');
Parameter Type Description
numberOrGroupId string Required. 6281292267204 (you can use a number or group id)

Please check this out

mywaapi-php-lib's People

Contributors

yama24 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.