PHPackages                             taddy/taddy-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. taddy/taddy-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

taddy/taddy-sdk
===============

Taddy PHP SDK

1.1.11(9mo ago)0874MITPHPPHP &gt;=8.2

Since Jan 21Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/taddy-pro/taddy-sdk-php)[ Packagist](https://packagist.org/packages/taddy/taddy-sdk)[ RSS](/packages/taddy-taddy-sdk/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (6)Versions (24)Used By (0)

Install SDK
-----------

[](#install-sdk)

```
composer require taddy/taddy-sdk
```

Initialize Taddy
----------------

[](#initialize-taddy)

```
use Taddy\Sdk\Taddy;

$taddy = new Taddy(pubId: 'bot-xxxxxxxxxxxxxx', new TaddyOptions(
    token: '123456780:yyyyyyyyyyyyyyyyyy', // Your bot's token
));
```

Define User with all data you have
----------------------------------

[](#define-user-with-all-data-you-have)

```
use Taddy\Sdk\Dto\User as TaddyUser;

$user = TaddyUser::factory($tgUserId)
    ->withUsername($tgUsername)
    ->withFirstName($tgFirstName)
    // other stuff
;
```

Start event
-----------

[](#start-event)

#### Handle `/start` command to detect incoming users (basic integration)

[](#handle-start-command-to-detect-incoming-users-basic-integration)

```
$taddy->start(
    user: $user, // User DTO
    start: $startMessage // text from update with /start command
);
```

Ads Service
-----------

[](#ads-service)

#### Initialize Ads Service

[](#initialize-ads-service)

```
$ads = $taddy->ads();
```

#### Automatically show ads

[](#automatically-show-ads)

```
// Retrieve ad for $user
$ad = $ads->getAd($user);

// Ad exists, showtime!
if ($ad) {
    $ads->show($ad, $user);
}
```

#### Manual show ads

[](#manual-show-ads)

```
// Retrieve ad for $user
$ad = $ads->getAd($user);

// Ad exists, showtime!
if ($ad) {
    // show $ad
    myShowAdFuncation($ad); // your custom method

    // send imoressions event
    $ads->impressions($user, $ad->id);

    // show ad delay 15 sec.
    sleep(15);

    // hide $ad (delete message)
    myHideAdFuncation($ad); // your custom method
}
```

Exchange Service
----------------

[](#exchange-service)

#### Initialize Exchange Service

[](#initialize-exchange-service)

```
$exchange = $taddy->exchange();
```

#### Get tasks list (feed) to display

[](#get-tasks-list-feed-to-display)

This method returns array of `ExchangeFeedItem` DTO with `id`, `title`, `description`, `image`, `type` and `link` fields. You need to display it how you want.

```
$feed = $exchange->getFeed(
    user: $user, // User DTO
    limit: 4, // limit tasks count
    imageFormat: 'png', // png, webp, jpg
    autoImpressions: false, // automatically send impressions event
);
```

#### Send impressions event

[](#send-impressions-event)

If you are not used `autoImpressions` in previous step, you should use this call to send impressions event manually

```
// send impressions event manually (after successful show)
$exchange->impressionsEvent(
    user: $user, // User DTO
    items: $feed, // showed items array
);
```

#### Check exchange

[](#check-exchange)

You track if exchange completed using webhooks or calling this method

```
// send impressions event manually (after successful show)
$exchange->check(
    user: $user, // User DTO
    item: $item, // ExchangeFeedItem DTO or item id
);
```

Custom events (optional)
------------------------

[](#custom-events-optional)

```
// send custom event
$taddy->customEvent(
    user: $user, // User DTO
    event: 'custom1', // custom event: custom1 ... custom4
    value: 1.23, // Value (optional)
    currency: Currency::USD, // value currency (optional)
    once: false, // one-time event registration (optional)
);
```

### See also

[](#see-also)

- [Taddy Docs](https://taddy.gitbook.io/docs)
- [Taddy Rest API](https://taddy.gitbook.io/docs/api)
- [Taddy PHP SDK](https://taddy.gitbook.io/docs/sdk/php)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance56

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~10 days

Recently: every ~34 days

Total

23

Last Release

292d ago

Major Versions

0.1.8 → 1.0.02025-04-14

PHP version history (2 changes)0.1.0PHP ^8.3

0.1.8PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/63879dd901c9fe1b39a20e7847dbc93d69c19a8b3e7e7480bca1a993df1e267c?d=identicon)[yauhenko](/maintainers/yauhenko)

---

Top Contributors

[![yauhenko](https://avatars.githubusercontent.com/u/4437817?v=4)](https://github.com/yauhenko "yauhenko (28 commits)")

### Embed Badge

![Health badge](/badges/taddy-taddy-sdk/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M514](/packages/shopware-core)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M120](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51090.8k2](/packages/web-auth-webauthn-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19564.8M1.6k](/packages/drupal-core)

PHPackages © 2026

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