PHPackages                             vcoud/mercadolibre - 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. vcoud/mercadolibre

ActiveLibrary[API Development](/categories/api)

vcoud/mercadolibre
==================

Mercadolibre SDK Composer Package

1.0.1(9y ago)423.7k↓37.9%3MITPHPPHP &gt;=5.3.0

Since Oct 14Pushed 9y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/bb00724c83e49009ae858c072060c43cbef22ece1822f5d6e43f0c905723a044/68747470733a2f2f706f7365722e707567782e6f72672f76636f75642f6d65726361646f6c696272652f76657273696f6e)](https://packagist.org/packages/vcoud/mercadolibre)[![mercadolibre-sdk](https://camo.githubusercontent.com/3ce39bf4bf6e7da2b27adf2a41bbd7099d1f8b4ee9ed8913ebe64002a7249420/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d65726361646f6c696272652d2d73646b2d312e312e302d79656c6c6f772e737667)](https://github.com/mercadolibre/php-sdk)

MercadoLibre's PHP SDK Composer Package
=======================================

[](#mercadolibres-php-sdk-composer-package)

This is a fork of [MercadoLibre's PHP Sdk](https://github.com/mercadolibre/php-sdk), we only make it easy to implement on laravel projects

How do I install it?
--------------------

[](#how-do-i-install-it)

```
   composer require vcoud/mercadolibre

```

How do I use it?
----------------

[](#how-do-i-use-it)

The first thing to do is to instance a `Meli` class. You'll need to give a `clientId` and a `clientSecret`. You can obtain both after creating your own application. For more information on this please read: [creating an application](http://developers.mercadolibre.com/application-manager/)

### Create an instance of Meli class

[](#create-an-instance-of-meli-class)

Simple like this

```
use Vcoud\Mercadolibre\Meli;

$meli = new Meli('1234', 'a secret');
```

With this instance you can start working on MercadoLibre's APIs.

There are some design considerations worth to mention.

1. This SDK is just a thin layer on top of an http client to handle all the OAuth WebServer flow for you.
2. There is JSON parsing. this SDK will include [json](http://php.net/manual/en/book.json.php) for internal usage.
3. This SDK will include [curl](http://php.net/manual/en/book.curl.php) for internal usage.
4. If you already have the access\_token and the refresh\_token you can pass in the constructor

```
$meli = new Meli('1234', 'a secret', 'Access_Token', 'Refresh_Token');
```

How do I redirect users to authorize my application?
----------------------------------------------------

[](#how-do-i-redirect-users-to-authorize-my-application)

This is a 2 step process.

First get the link to redirect the user. This is very easy! Just:

```
$redirectUrl = $meli->getAuthUrl("http://somecallbackurl",Meli::$AUTH_URL['MLB']); //  Don't forget to set the autentication URL of your country.
```

This will give you the url to redirect the user. You need to specify a callback url which will be the one that the user will redirected after a successfull authrization process.

Once the user is redirected to your callback url, you'll receive in the query string, a parameter named `code`. You'll need this for the second part of the process.

```
$user = $meli->authorize($_GET['code'], 'http://somecallbackurl');
```

This will get an `access_token` and a `refresh_token` (is case your application has the `offline_access`) for your application and your user.

At this stage your are ready to make call to the API on behalf of the user.

#### Making GET calls

[](#making-get-calls)

```
$params = array('access_token' => $access_token);
$result = $meli->get('/users/me', $params);
 #If you wish , you can get an associative array with param $assoc = true Example:
$result = $meli->get('/users/me', $params, true);
```

#### Making POST calls

[](#making-post-calls)

```
$params = array('access_token' => $access_token);

  #this body will be converted into json for you
$body = array('foo' => 'bar', 'bar' => 'foo');

$response = $meli->post('/items', $body, $params);
```

#### Making PUT calls

[](#making-put-calls)

```
$params = array('access_token' => $access_token);

  #this body will be converted into json for you
$body = array('foo' => 'bar', 'bar' => 'foo');

$response = $meli->put('/items', $body, $params);
```

#### Making DELETE calls

[](#making-delete-calls)

```
$params = array('access_token' => $access_token);
$response = $meli->delete('/questions/123', $params)
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/007f5da3a362d72f7626708f101dddfcb2e4dd6cb4287e6976520724ac86d8ac?d=identicon)[keyduq](/maintainers/keyduq)

---

Top Contributors

[![pablomoretti](https://avatars.githubusercontent.com/u/530831?v=4)](https://github.com/pablomoretti "pablomoretti (38 commits)")[![keyduq](https://avatars.githubusercontent.com/u/4933682?v=4)](https://github.com/keyduq "keyduq (12 commits)")[![Phaael](https://avatars.githubusercontent.com/u/8864507?v=4)](https://github.com/Phaael "Phaael (9 commits)")[![brunoelia](https://avatars.githubusercontent.com/u/115396?v=4)](https://github.com/brunoelia "brunoelia (6 commits)")[![ZeusMode](https://avatars.githubusercontent.com/u/777842?v=4)](https://github.com/ZeusMode "ZeusMode (5 commits)")[![rodurma](https://avatars.githubusercontent.com/u/79693?v=4)](https://github.com/rodurma "rodurma (3 commits)")[![TioBorracho](https://avatars.githubusercontent.com/u/345822?v=4)](https://github.com/TioBorracho "TioBorracho (3 commits)")[![rafaelsantos82](https://avatars.githubusercontent.com/u/180335726?v=4)](https://github.com/rafaelsantos82 "rafaelsantos82 (2 commits)")[![morturus](https://avatars.githubusercontent.com/u/1568438?v=4)](https://github.com/morturus "morturus (2 commits)")[![lbertalot](https://avatars.githubusercontent.com/u/3768857?v=4)](https://github.com/lbertalot "lbertalot (2 commits)")[![pablogumilla](https://avatars.githubusercontent.com/u/2159996?v=4)](https://github.com/pablogumilla "pablogumilla (1 commits)")

---

Tags

composerlaravelmercadolibrepackagephpsdksdkMercadoLibrevcoud

### Embed Badge

![Health badge](/badges/vcoud-mercadolibre/health.svg)

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

###  Alternatives

[appwilio/cdek-sdk

CDEK API SDK (cdek.ru)

406.5k](/packages/appwilio-cdek-sdk)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

223.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

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