{"id":41922388,"url":"https://github.com/the-gusev/apigram","last_synced_at":"2026-01-25T17:02:34.955Z","repository":{"id":218594417,"uuid":"746823318","full_name":"the-gusev/apigram","owner":"the-gusev","description":"🤖 APIGram - simple PHP SDK for Telegram API","archived":false,"fork":false,"pushed_at":"2024-02-20T07:59:40.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T06:29:18.540Z","etag":null,"topics":["api","bot","client","composer","guzzle","guzzlehttp","integration","legacy","library","php","sdk","telegram","telegram-api","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-gusev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T18:38:57.000Z","updated_at":"2024-01-27T12:27:19.000Z","dependencies_parsed_at":"2024-01-27T11:53:40.596Z","dependency_job_id":"ded795d2-68c1-45d1-8709-ba9f3b437bf0","html_url":"https://github.com/the-gusev/apigram","commit_stats":null,"previous_names":["teh9/apigram","the-gusev/apigram"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/the-gusev/apigram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gusev%2Fapigram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gusev%2Fapigram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gusev%2Fapigram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gusev%2Fapigram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-gusev","download_url":"https://codeload.github.com/the-gusev/apigram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-gusev%2Fapigram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"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":["api","bot","client","composer","guzzle","guzzlehttp","integration","legacy","library","php","sdk","telegram","telegram-api","telegram-bot","telegram-bot-api"],"created_at":"2026-01-25T17:02:33.769Z","updated_at":"2026-01-25T17:02:34.945Z","avatar_url":"https://github.com/the-gusev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APIGram Simple PHP Telegram API SDK\nA lightweight and simple library for working with the Telegram Bot API, is under active development. But some methods are already available for work, see paragraph 3.\n\n![Downloads](https://img.shields.io/packagist/dt/teh9/apigram)\n![Version](https://img.shields.io/github/v/release/teh9/apigram)\n![Build](https://github.com/teh9/apigram/actions/workflows/php.yml/badge.svg)\n\n## 1. Prerequisites\n- PHP \u003e= 7.2.5\n\n## 2. Installation\n```\ncomposer require teh9/apigram\n```\n\n## 3. Initialization\n\n```php \n$client = \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e1. Messages\u003c/b\u003e\u003c/summary\u003e\n  \n##### Send message:\n\n```php\n$chatId = 1;\n\n$apigram = new \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n$response = $apigram-\u003emessages()-\u003eto($chatId)-\u003esend('text');\n\n$response-\u003egetMessageId(); // Get message id\n\n```\n##### Edit message:\n\n```php\n$chatId = 1;\n$apigram = new \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n$response = $apigram-\u003emessages()-\u003eedit('TELEGRAM_CHAT_ID', 'MESSAGE_ID', 'lorem ipsum new text');\n\nvar_dump($response-\u003egetMessageText()); // lorem ipsum new text\n\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e2. Webhook\u003c/b\u003e\u003c/summary\u003e\n\n##### Set webhook:\n```php\n$webhookUrl = 'https://yourwebhook.net';\n\n$apigram = new \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n$response = $apigram-\u003ewebhook()-\u003eset($webhookUrl);\n\nvar_dump($response-\u003estatus()); // true/false\n```\n\n##### Remove webhook:\n```php\n$apigram = new \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n$response = $apigram-\u003ewebhook()-\u003eremove();\n\nvar_dump($response-\u003estatus()); // true/false\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e3. Bot\u003c/b\u003e\u003c/summary\u003e\n\n##### Get me (info about bot):\n```php\n$apigram = new \\Teh9\\Apigram\\Client\\TelegramClient('BOT_API_TOKEN');\n$response = $apigram-\u003ebot()-\u003egetMe();\n\nvar_dump($response-\u003egetId()); // Bot id\nvar_dump($response-\u003egetFirstName()); // Bot name\nvar_dump($response-\u003egetUserName()); // Bot login\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e4. Assets\u003c/b\u003e\u003c/summary\u003e\n\n##### Send photo:\n```php\n$imagePath = 'https://i.imgur.com/SVm9n13_d.jpg';\n\n$apigram = new TelegramClient(getenv('TELEGRAM_BOT_TOKEN'));\n$response = $apigram-\u003eassets()-\u003eto(getenv('TELEGRAM_CHAT_ID'))-\u003esendPhoto($imagePath);\n// or\n$response = $apigram-\u003eassets()-\u003eto(getenv('TELEGRAM_CHAT_ID'))-\u003ecaption('test caption')-\u003esendPhoto($imagePath);\n\n\nvar_dump($response-\u003estatus());\nvar_dump($response-\u003egetMessageId());\n```\n\u003c/details\u003e\n\n## License\nThe MIT License (MIT). Please see \u003ca href=\"https://github.com/teh9/apigram/blob/master/LICENSE\"\u003eLicense File\u003c/a\u003e for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-gusev%2Fapigram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-gusev%2Fapigram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-gusev%2Fapigram/lists"}