PHPackages                             dragu/php-allegroapi - 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. dragu/php-allegroapi

ActiveLibrary[API Development](/categories/api)

dragu/php-allegroapi
====================

A newest library to communicate with Allegro Api. The library is OOP, good tested and easy to use. Make your job enjoyable. The version is tested with PHP5.5

31PHP

Since May 14Pushed 10y ago2 watchersCompare

[ Source](https://github.com/dragu/PHP-AllegroApi)[ Packagist](https://packagist.org/packages/dragu/php-allegroapi)[ RSS](/packages/dragu-php-allegroapi/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP-AllegroApi
==============

[](#php-allegroapi)

A newest library to communicate with Allegro Api. The library is OOP, good tested and easy to use. Make your job enjoyable. The version is tested with PHP5.5

Documentation
=============

[](#documentation)

In this section I describe a class and methods you should use

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

[](#configuration)

To run test you must insert you login, password and appkey to Config/config.ini file.

```
login = "Insert your login here"
hashPassword = "Insert your password's hash here - NEVER do it in production"
apikey = "Insert your apikey here"
sandbox = false
countryCode = 1
```

The file is use only by tests.

You can create your access data by  page. *sandbox* is use to switch allegro sandbox and production version. *countryCode* is used to select current country. Default 1 mean *Poland*. If you want you can change country to communication with other allegroGroup services like: aukro.cz, molotok.ru, aukro.ua, teszvesz.hu

Security
--------

[](#security)

Never storage your plain password. Your app should always hash it by sha256 (used by allegro)

```
  $hashPassword = base64_encode(hash('sha256', YOUR_ALLEGRO_PASSWORD, true));
```

Class AllegroApi
----------------

[](#class-allegroapi)

AllegroApi is main class. Provide api access interface.

### Constructor

[](#constructor)

*Require* one object with login, hashPassword (or password - strongly no recomended), apikey, sandbox, countryCode fields. The data is use to init connections.

### LoginEnc

[](#loginenc)

Login to allegro (use constructor data)

### Run functions

[](#run-functions)

The api use \_call to maping functions names to allegro request. You should use short names without "do". Use getCountries (to rum allegro doGetCountries function).

```
  $allegroApi = new AllegroApi($login, $hashPassword, $apiKey, $sandbox, $countryCode);
  $countrisResponse = $allegroApi->getCountries();
```

\#Allegro functions documentation Description of all allegro functions are available on

Quick start
===========

[](#quick-start)

Clone empty project:

```
git clone https://github.com/SebastianPozoga/PHP-AllegroApi-EmptyProject.git
composer install
```

And run:

```
php index.php

```

Tests
=====

[](#tests)

Run tests by:

```
phpunit tests/AllegroApiTest

```

Older version
=============

[](#older-version)

It is strong recomended to use new version of PHP Allegro Api Library. If you must use old version is available on

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7c186e5abe852773b9470d83946af2a75809a7f22168fab8d0a4ff5f849e543?d=identicon)[dragu](/maintainers/dragu)

---

Top Contributors

[![SebastianPozoga](https://avatars.githubusercontent.com/u/1093166?v=4)](https://github.com/SebastianPozoga "SebastianPozoga (16 commits)")[![adriandmitroca](https://avatars.githubusercontent.com/u/3842935?v=4)](https://github.com/adriandmitroca "adriandmitroca (2 commits)")

### Embed Badge

![Health badge](/badges/dragu-php-allegroapi/health.svg)

```
[![Health](https://phpackages.com/badges/dragu-php-allegroapi/health.svg)](https://phpackages.com/packages/dragu-php-allegroapi)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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