Download the PHP package yoopl/viberbot without Composer

On this page you can find all versions of the php package yoopl/viberbot. 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 viberbot

Viber Bot

The purpose of this package is to allow the use of the Viber Bot option for transactional communication with your customers, unlike other packages that are geared for advertising broadcast or answering support questions.

This package is based on paragraf-lex/viber-bot.

Installation

Install through Composer.

Setup

Env

Set the following parameters in your .env file:

VIBERBOT_API=viber_token VIBERBOT_NAME=name VIBERBOT_PHOTO=photo VIBERBOT_LOG=true VIBERBOT_SEND=true

Config

Additional configuration is available through the config file. You can publish it to your config folder:

php artisan vendor:publish --tag=viberBot

Webhook

To publish your webhook setup your route and run the following artisan command with the route name as argument:

php artisan viberbot:webhook route_name

Logging

Use the env/config parameter to turn on or off the logging of incoming hook calls and outgoing viber messages. Useful for debugging or saving a history of conversations.

You need to setup two logging channels called viberbot and viberbot_hook if you activate logging.

Subscribing a user

Use the Bot to listen to ConversationStarted events, so you can send a message to the customer, prompting a subscription to your bot. Make sure you save the viber ID that you receive upon subscription!

You can also build your Bot to answer questions, if you need to.

Sending a message

Use the Client to send messages to your subscribers and build your notifications!

  1. Create a message that extends one of the ViberMessage classes from the package, i.e. Boyo\Viberbot\Messages\TextMessage
  2. Set the $this->text parameter (for a text message), and any other needed parameter (keyboards, media, etc.), within the Message class construct
  3. Create an instance of the Client $client = new ViberClient();
  4. Send the message, passing a ViberUser model (the recipient) $client->send($message,$user)

Builiding a notification

  1. Add the viberbot channel to the via parameter in your Laravel notification $via[] = ViberbotChannel::class;
  2. Create a method toViberbot($notifiable)
  3. In this method return a Viber Message which extends one of the classes from the package, i.e. Boyo\Viberbot\Messages\TextMessage
  4. Set the $this->text parameter (for a text message), and any other needed parameter (keyboards, media, etc.), within the Message class construct

All versions of viberbot with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
laravel/framework Version >=6.0
guzzlehttp/guzzle Version >=6.3
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 yoopl/viberbot contains the following files

Loading the files please wait ....