PHPackages                             admitad/api - 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. [API Development](/categories/api)
4. /
5. admitad/api

ActiveLibrary[API Development](/categories/api)

admitad/api
===========

Admitad api library

0.3.2(1y ago)35200.5k↓25.3%34[2 PRs](https://github.com/admitad/admitad-php-api/pulls)1MITPHPPHP &gt;=8.1

Since Aug 31Pushed 1y ago9 watchersCompare

[ Source](https://github.com/admitad/admitad-php-api)[ Packagist](https://packagist.org/packages/admitad/api)[ RSS](/packages/admitad-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (12)Used By (1)

admitad-api
===========

[](#admitad-api)

A PHP wrapper around the Admitad API

Install
-------

[](#install)

Install  and run the following command:

```
php composer.phar require admitad/api dev-master

```

Examples
--------

[](#examples)

#### Request access token

[](#request-access-token)

- By username / password

```
$api = new \Admitad\Api\Api()
$response = $api->authorizeByPassword($clientId, $clientPassword, $scope, $username, $password);
$result = $api->getArrayResultFromResponse($response); // or $response->getArrayResult();
```

- OAuth2

```
// 1 step - get oauth authorization url
$api = new \Admitad\Api\Api();
$authorizeUrl = $api->getAuthorizeUrl($clientId, $redirectUri, $scope);
// redirect user to authorizeUrl

// 2 step - request access token by OAuth2 code returned from authorization url
$response = $api->requestAccessToken($clientId, $clientSecret, $code, $redirectUri);
$result = $api->getArrayResultFromResponse($response);
```

- Signed Request (for applications on apps.admitad.com)

```
$api = new \Admitad\Api\Api();
$data = $api->parseSignedRequest($signedRequest, $clientSecret);
// this method throws Admitad\Api\Exception\InvalidSignedRequestException when $signedRequest is invalid
```

#### Refresh token

[](#refresh-token)

```
$response = $api->refreshToken($clientId, $clientSecret, $refreshToken);
$result = $api->getArrayResultFromResponse($response);
```

#### Methods

[](#methods)

There are 2 common methods to communicate with api:

```
$api = new \Admitad\Api\Api($accessToken);

$api->get($path, $params);
$api->post($path, $params);

//for example
$response = $api->get('/advcampaigns/', array(
    'limit' => 20,
    'offset' => 0
));

$result = $api->getArrayResultFromResponse($response);
```

Paginated-result methods can be iterated in this way (instead of manually call methods with different offsets)

```
$iterator = $api->getIterator('/advcampaigns/', array(
    'order_by' => 'id'
));

foreach ($iterator as $campaign) {
    // do smth with campaign
}
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 76.5% 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 ~373 days

Recently: every ~568 days

Total

9

Last Release

559d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.3.0

0.2.0PHP &gt;=7.1

0.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/08dc9a1ad27594570611a0dedc1b8ae8f28772d9e1f3a811de931f021f224eda?d=identicon)[admitad-dev](/maintainers/admitad-dev)

---

Top Contributors

[![sirian](https://avatars.githubusercontent.com/u/897643?v=4)](https://github.com/sirian "sirian (26 commits)")[![bulychev](https://avatars.githubusercontent.com/u/4833024?v=4)](https://github.com/bulychev "bulychev (3 commits)")[![pehas](https://avatars.githubusercontent.com/u/4531287?v=4)](https://github.com/pehas "pehas (3 commits)")[![andreydiveev](https://avatars.githubusercontent.com/u/1609473?v=4)](https://github.com/andreydiveev "andreydiveev (1 commits)")[![lexasngrv](https://avatars.githubusercontent.com/u/2675913?v=4)](https://github.com/lexasngrv "lexasngrv (1 commits)")

---

Tags

apiadmitad

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/admitad-api/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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