{"id":36977278,"url":"https://github.com/polyskalov/botman-viber-driver","last_synced_at":"2026-01-13T22:46:18.708Z","repository":{"id":57043470,"uuid":"233555508","full_name":"polyskalov/botman-viber-driver","owner":"polyskalov","description":"Viber driver for botman —  a PHP library to build chat bots","archived":false,"fork":true,"pushed_at":"2020-10-23T13:49:01.000Z","size":50,"stargazers_count":7,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-26T13:59:57.789Z","etag":null,"topics":["bot","bot-framework","botman","botman-driver","php","viber"],"latest_commit_sha":null,"homepage":"https://botman.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"botman-fork/botman-viber-driver","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polyskalov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T09:13:13.000Z","updated_at":"2024-06-11T14:51:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/polyskalov/botman-viber-driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/polyskalov/botman-viber-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyskalov%2Fbotman-viber-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyskalov%2Fbotman-viber-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyskalov%2Fbotman-viber-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyskalov%2Fbotman-viber-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyskalov","download_url":"https://codeload.github.com/polyskalov/botman-viber-driver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyskalov%2Fbotman-viber-driver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bot-framework","botman","botman-driver","php","viber"],"created_at":"2026-01-13T22:46:18.624Z","updated_at":"2026-01-13T22:46:18.693Z","avatar_url":"https://github.com/polyskalov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BotMan Viber Driver\nConnect Viber with [BotMan](http://botman.io/)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/polyskalov/botman-viber-driver.svg?style=flat-square)](https://packagist.org/packages/polyskalov/botman-viber-driver)\n\n\n## Installation \u0026 Setup\nFirst you need to pull in the Viber Driver.\n\n```console\ncomposer require polyskalov/botman-viber-driver\n```\nThen load the driver before creating the BotMan instance (only when you don't use BotMan Studio):\n\n```php\nDriverManager::loadDriver(\\TheArdent\\Drivers\\Viber\\ViberDriver::class);\n\n// Create BotMan instance\nBotManFactory::create($config);\n```\nThis driver requires a valid and secure URL in order to set up webhooks and receive events and information from the chat users. This means your application should be accessible through an HTTPS URL.\n\nTo connect BotMan with your Viber Bot, you first need to follow the [official guide](https://partners.viber.com/account/create-bot-account) to create your Viber Bot and an access token.\n\nOnce you have obtained the access token, place it in your .env file like VIBER_TOKEN=YOUR-VIBER-TOKEN-HERE. There it gets automatically loaded to your config/botman/viber.php file.\n\nIf you don't use BotMan Studio, add these line to $config array that you pass when you create the object from BotManFactory.\n\n```\n'viber' =\u003e [\n    'token' =\u003e 'YOUR-VIBER-TOKEN-HERE',\n]\n```\n\n## Register Your Webhook\nTo let your Viber Bot know, how it can communicate with your BotMan bot, you have to register the URL where BotMan is running at, with Viber.\n\nYou can do this by sending a `POST` request to this URL:\n\n```https://chatapi.viber.com/pa/set_webhook```\n\nThis POST request needs parameter called url with the URL that points to your BotMan logic / controller. If you use [BotMan Studio](https://botman.io/2.0/botman-studio) it will be: `https://yourapp.domain/botman`. HTTPS is a must, because of security reasons.\n\n```json\n{\n   \"url\":\"https://my.host.com\",\n   \"event_types\":[\n      \"delivered\",\n      \"seen\",\n      \"failed\",\n      \"subscribed\",\n      \"unsubscribed\",\n      \"conversation_started\"\n   ],\n   \"send_name\": true,\n   \"send_photo\": true\n}\n```\nYou can read about other fields in the request in the [official documentation](https://developers.viber.com/docs/api/rest-bot-api/#setting-a-webhook).\n\nInstead of manually sending the request to Viber you can use a console command to register your Webhook.\n\n``` php artisan botman:viber:register```\n\n## Example\n```php\n\u003c?php\n\n/** @var \\BotMan\\BotMan\\BotMan $botman */\n$botman = resolve('botman');\n\n$botman-\u003eon(\n    'conversation_started',\n    static function (array $payload, BotMan $bot) {\n        $bot-\u003ereply('Hi, ' . $bot-\u003egetUser()-\u003egetUsername());\n    }\n);\n\n$botman-\u003ehears('hi', static function (BotMan $bot) {\n    $bot-\u003ereply('👋');\n});\n\n$botman-\u003efallback(static function (BotMan $bot) {\n    $bot-\u003ereply('I do not understand');\n});\n\n$botman-\u003elisten();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyskalov%2Fbotman-viber-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyskalov%2Fbotman-viber-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyskalov%2Fbotman-viber-driver/lists"}