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)36206.1k↓62.9%34[2 PRs](https://github.com/admitad/admitad-php-api/pulls)2MITPHPPHP &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 yesterday

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

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 93% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community25

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

605d 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://avatars.githubusercontent.com/u/1942948?v=4)[Admitad Developer](/maintainers/admitad-dev)[@admitad-dev](https://github.com/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

[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[theodo-group/llphant

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

1.7k409.0k6](/packages/theodo-group-llphant)[keboola/storage-api-client

Keboola Storage API PHP Client

10405.9k40](/packages/keboola-storage-api-client)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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