PHPackages                             socialiteproviders/telegram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. socialiteproviders/telegram

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

socialiteproviders/telegram
===========================

Telegram Authentication Provider for Laravel Socialite

4.1.2(4y ago)14317.7k—8.7%62MITPHPPHP ^7.2 || ^8.0

Since Aug 11Pushed 1y ago2 watchersCompare

[ Source](https://github.com/SocialiteProviders/Telegram)[ Packagist](https://packagist.org/packages/socialiteproviders/telegram)[ RSS](/packages/socialiteproviders-telegram/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (2)

Telegram
========

[](#telegram)

```
composer require socialiteproviders/telegram
```

Installation &amp; Basic Usage
------------------------------

[](#installation--basic-usage)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

Configuration
-------------

[](#configuration)

First of all, you must create a bot by contacting [@BotFather](http://t.me/BotFather) ()

> Don't forget to set your website URL using `/setdomain`

Then, you need to add your bot's configuration to `config/services.php`. The bot username is required, `client_id` must be `null`. The provider will also ask permission for the bot to write to the user.

```
'telegram' => [
    'bot' => env('TELEGRAM_BOT_NAME'),  // The bot's username
    'client_id' => null,
    'client_secret' => env('TELEGRAM_TOKEN'),
    'redirect' => env('TELEGRAM_REDIRECT_URI'),
],
```

### Add provider event listener

[](#add-provider-event-listener)

#### Laravel 11+

[](#laravel-11)

In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method.

- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('telegram', \SocialiteProviders\Telegram\Provider::class);
});
```

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Telegram\TelegramExtendSocialite::class.'@handle',
    ],
];
```

### Usage

[](#usage)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('telegram')->redirect();
```

You **can** add the login button to your page, anywhere you want with this snippet:

```
{!! Socialite::driver('telegram')->getButton() !!}
```

If you want to see the Telegram Widget configuration page:

### Returned User fields

[](#returned-user-fields)

- `id`
- `first_name`
- `last_name`
- `username`
- `photo_url`

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Total

6

Last Release

1775d ago

Major Versions

v3.0.1 → 4.0.02020-10-25

PHP version history (2 changes)v3.0.0PHP ^7.2

4.1.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/65eb3a7ba2a2c13b3a9de48b836caf759ad4052f9a839e30464c80d177d5b3d2?d=identicon)[atymic](/maintainers/atymic)

---

Top Contributors

[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (13 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (6 commits)")[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (2 commits)")[![robiiinos](https://avatars.githubusercontent.com/u/16455953?v=4)](https://github.com/robiiinos "robiiinos (2 commits)")[![DengSihan](https://avatars.githubusercontent.com/u/33658414?v=4)](https://github.com/DengSihan "DengSihan (1 commits)")[![geozhur](https://avatars.githubusercontent.com/u/22957083?v=4)](https://github.com/geozhur "geozhur (1 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")

---

Tags

laraveloauthoauth1oauth2social-mediasocialitesocialite-providers

### Embed Badge

![Health badge](/badges/socialiteproviders-telegram/health.svg)

```
[![Health](https://phpackages.com/badges/socialiteproviders-telegram/health.svg)](https://phpackages.com/packages/socialiteproviders-telegram)
```

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

556.0M19](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/laravelpassport

LaravelPassport OAuth2 Provider for Laravel Socialite

621.3M7](/packages/socialiteproviders-laravelpassport)[socialiteproviders/discord

Discord OAuth2 Provider for Laravel Socialite

422.0M17](/packages/socialiteproviders-discord)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
