{"id":20614946,"url":"https://github.com/borsaco/telegrambotapibundle","last_synced_at":"2025-07-10T22:19:48.170Z","repository":{"id":35006454,"uuid":"195843354","full_name":"borsaco/TelegramBotApiBundle","owner":"borsaco","description":" A symfony wrapper bundle for Telegram Bot API.","archived":false,"fork":false,"pushed_at":"2022-03-17T15:51:57.000Z","size":48,"stargazers_count":56,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T11:04:52.338Z","etag":null,"topics":["symfony","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borsaco.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":"2019-07-08T15:47:14.000Z","updated_at":"2024-10-30T13:34:30.000Z","dependencies_parsed_at":"2022-08-08T03:16:15.872Z","dependency_job_id":null,"html_url":"https://github.com/borsaco/TelegramBotApiBundle","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/borsaco/TelegramBotApiBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borsaco%2FTelegramBotApiBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borsaco%2FTelegramBotApiBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borsaco%2FTelegramBotApiBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borsaco%2FTelegramBotApiBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borsaco","download_url":"https://codeload.github.com/borsaco/TelegramBotApiBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borsaco%2FTelegramBotApiBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260446057,"owners_count":23010499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["symfony","telegram","telegram-bot"],"created_at":"2024-11-16T11:13:57.631Z","updated_at":"2025-06-17T21:44:15.120Z","avatar_url":"https://github.com/borsaco.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"TelegramBotApiBundle\n===================\nA symfony wrapper bundle for  [Telegram Bot API](https://core.telegram.org/bots/api).\n\n## Install\n\nVia Composer\n\n``` bash\ncomposer require borsaco/telegram-bot-api-bundle\n```\n\n## Configure the bundle\n\nThis bundle was designed to just work out of the box. The only thing you have to configure in order to get this bundle up and running is your bot [token](https://core.telegram.org/bots#botfather).\n\n```yaml\n# config/packages/telegram.yaml\n\ntelegram_bot_api:\n    # Proxy (optional) :\n    #proxy: 'socks5h://127.0.0.1:5090' # this is example you have to change this\n    #async_requests: false\n\n    # Development section:\n    development:\n        # implement in next version\n        # Telegram user_id of developers accounts\n        developers_id: [1234567, 87654321]\n        # If this mode is enabled, the robot only responds to the developers\n        maintenance:\n            text: \"The robot is being repaired! Please come back later.\"\n  \n    # Bots:\n    bots:\n        # The bot name\n        first:\n            # Your bot token: (required)\n            token: 123456789:ABCD1234****4321CBA\n            maintenance: false\n        second:\n            # Your bot token: (required)\n            token: 123456789:ABCD1234****4321CBA\n            maintenance: false\n    \n    # The default bot returned when you call getBot()\n    default: 'second' \n```\n\n## Usage\n\nYou can access the bot in the controller with :\n```php\n    use Borsaco\\TelegramBotApiBundle\\Service\\Bot;\n\n    ...\n\n    public function index(Bot $bot)\n    {\n        $firstBot = $bot-\u003egetBot('first');\n        $firstBot-\u003egetMe();\n    }\n```\n\n## Webhook\nIn order to receive updates via a Webhook, You first need to tell your webhook URL to Telegram. You can use setWebhook method to specify a url and receive incoming updates via an outgoing webhook or use this commands:.\n\nfor get information about webhook of bot:\n```bash\n    $ php bin/console telegram:bot:webhook:info\n```\n\nfor set webhook url for the bot:\n```bash\n    $ php bin/console telegram:bot:webhook:set\n```\n\nfor delete webhook of the bot:\n```bash\n    $ php bin/console telegram:bot:webhook:delete\n```\n\nOnce you set the webhook using the setWebhook method, You can then use the below function to retrieve the updates that are sent to your Webhook URL. The function returns an array of Update objects.\n```php\n    $updateArray = $firstBot()-\u003egetWebhookUpdate();\n```\n\n## Maintenance\n\nIf want to use maintenance of bots you can check `$bot-\u003eisMaintenance('bot_name')` in your entry point controller and send response message.\n\n## Next...\n\nPlease refer to [Telegram Bot API Official Document](https://core.telegram.org/bots/api) for getting information about available methods and other informations.\n\n## Troubleshooting\n\nIf you did all the configurations correctly but still getting errors (Http error 500) even on getMe() method, it might be because of SSL Verification. Please make sure you have up-to-date CA root certificate bundle to be used with cURL.\n\nYou can configure you CA root certificate bundle by:\n\n 1. Downloading up-to-date cacert.pem file from cURL website and\n 2. Setting a path to it in your php.ini file, e.g. on Windows:\n\n `curl.cainfo=c:\\php\\cacert.pem`\n\nYou can test your SSL-setup online with this handy webtool on: [SSL Labs](https://www.ssllabs.com/ssltest)\n\n## License\n\nThe BSD License. Please see [License File](LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborsaco%2Ftelegrambotapibundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborsaco%2Ftelegrambotapibundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborsaco%2Ftelegrambotapibundle/lists"}