PHPackages                             eoko/magento2-client - 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. eoko/magento2-client

ActiveLibrary

eoko/magento2-client
====================

Eoko Magento 2 client for the API

2.0.1(8y ago)42.9k3OSL-3.0PHPPHP &gt;=7.1

Since Dec 4Pushed 8y ago2 watchersCompare

[ Source](https://github.com/eoko/magento2-client)[ Packagist](https://packagist.org/packages/eoko/magento2-client)[ RSS](/packages/eoko-magento2-client/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (12)Versions (9)Used By (0)

Eoko/magento2-client
====================

[](#eokomagento2-client)

[![Build Status](https://camo.githubusercontent.com/29694fc65062ba7a3d5a7ccfed819957bb46f66dd4c3cd609c9191200727e347/68747470733a2f2f7472617669732d63692e6f72672f656f6b6f2f6d6167656e746f322d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eoko/magento2-client)

A simple PHP client to use the [Magento2](https://github.com/magento/magento2).

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- Composer

Installation
------------

[](#installation)

We use HTTPPlug as the HTTP client abstraction layer. In this example, we will use [Guzzle](https://github.com/guzzle/guzzle) v6 as the HTTP client implementation.

`eoko/magento2-client` uses [Composer](http://getcomposer.org). The first step to use `eoko/magento2-client` is to download composer:

```
$ curl -s http://getcomposer.org/installer | php
```

Then, run the following command to require the library:

```
$ php composer.phar require eoko/magento2-client php-http/guzzle6-adapter
```

If you want to use another HTTP client implementation, you can check [here](https://packagist.org/providers/php-http/client-implementation) the full list of HTTP client implementations.

Getting started
---------------

[](#getting-started)

### Initialise the client

[](#initialise-the-client)

You first need to initialise the client with your credentials with admin token.

If you don't have any admin token, you can create it and retrieve with the following code :

```
