PHPackages                             ashek/admitad-api-php - 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. ashek/admitad-api-php

ActiveLibrary[API Development](/categories/api)

ashek/admitad-api-php
=====================

Admitad api library

0.2(2y ago)012MITPHPPHP &gt;=8.0

Since Jul 26Pushed 2y agoCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

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 = $response->getResult(); // 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 = $response->getResult();
```

- 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)

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

#### 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
$data = $api->get('/advcampaigns/', array(
    'limit' => 20,
    'offset' => 0
))->getResult();
```

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

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.8% 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 ~0 days

Total

2

Last Release

1027d ago

PHP version history (2 changes)0.1PHP &gt;=5.3.0

0.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb2b7572a43a371ffc30dade0a88c7977c8e8111cd233c04664d1bcb2394501?d=identicon)[AsheK](/maintainers/AsheK)

---

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)")[![AsheK](https://avatars.githubusercontent.com/u/1439404?v=4)](https://github.com/AsheK "AsheK (2 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

### Embed Badge

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

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

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

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

1.5k311.5k5](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[admitad/api

Admitad api library

35200.5k1](/packages/admitad-api)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

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