Download the PHP package xaamin/whatsapi without Composer

On this page you can find all versions of the php package xaamin/whatsapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package whatsapi

END OF SUPPORT

See https://github.com/xaamin/whatsapi/issues/38

Whatsapi

Wrapper for whatsapp/chat-api, that allows us send messages through WhatsApp. Thanks guys.

Installation

Non Laravel users

If you're not a Laravel user you only need to run the composer require command in order to install the needed package.

Laravel users

Assuming you already have composer installed on your system, install a new Laravel project into whatsapidemo folder

Ensure that you set webserver to use whatsapidemo/public as it's webroot. Now, if you visit http://localhost (or whatever domain name you are using) you should see a nice Laravel welcome message.

Change into your new whatsapidemo folder.

Require the needed package.

If you get [InvalidArgumentException] Could not find package xaamin/whatsapi at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability you must add these lines to your composer.json an then re-run previous command.

We tell Laravel that there is a Whatsapi ServiceProvider. At the end of config/app.php file, in the providers array, add:

Finally, Into the config/app.php file, add to aliases array each of these lines

Configuration

Non Laravel users

If you're using another Framework, different from Laravel, you must put manually the config file Config/config.php on the right path.

Now, we tell Whatsapi about the config values.

By default, the native implementation session use the $_SESSION global var, you can override this providing a instance that implements the contract Xaamin\Whatsapi\Sessions\SessionInterface.

Laravel users

We need to publish the config file that will allow you to very easily add all your account numbers.

Now everything has been installed, you just need to add your Whatsapp account details into the config file. There will now be a personal config file created for you in whatsapidemo/config/whatsapi.php. Open this file and edit the details with your account info. Once saved, you're good to use the API!

Usage

Note: You must create the data storage path specified in configuration file. The path must be writable for webserver.

Request registration code

When requesting the code, you can do it via SMS or voice call, in both cases you will receive a code like 123-456, that we will use for register the number.

Example response:

Registration

If you received the code like this 123-456 you should register like this '123456'

If everything went right, this should be the output:

See the entire registration process on https://github.com/WHAnonymous/Chat-API/wiki/WhatsAPI-Documentation#number-registration

Send messages

Check for new messages

Sync contacts

Example response

Missing methods

You can use all power of the whatsapp/chat-api getting and instance of Whatsprot class. Read the whatsapp/chat-api wiki for available methods.

You can use on routes, cli... you got the idea.


All versions of whatsapi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
whatsapp/chat-api Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xaamin/whatsapi contains the following files

Loading the files please wait ....