Documentação do Mercado Livre

Confira todas as informações necessárias sobre as APIs Mercado Livre.
circulos azuis em degrade
Última atualização em 06/04/2023

Manage your applications

Application details

To access full details about one of your applications, put the app_id in the API request.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/applications/$APP_ID

Example::

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/applications/12345

Response:

{
  "id": 213123928883922,
  "site_id": "MLB",
  "thumbnail": null,
  "url": "http://apps.mercadolivre.com.br/polipartes",
  "sandbox_mode": true,
  "project_id":null,
  "active": true,
  "max_requests_per_hour": 18000,
  "certification_status": "not_certified"
}

Private data of your application

Every time you want to know more details of your application data, you will have to do it using the Access Token of the user with which it was created.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/applications/$APP_ID

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/applications/12345

Authorized applications by user

To access all authorized applications by a user, do a GET with the user_id and the access token.


Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/applications

Exemple:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/26317316/applications

The response will be a set of applications with the following format:

[
  - {
  "user_id": "26317316",
  "app_id": "13795",
  "date_created": "2012-12-20T15:38:27.000-04:00",
  "scopes": - [
    "read",
    "write",
  ],
   },
]

Users who gave permissions to your application

To access the list of users who gave permissions to your app, perform the following GET:


Exemple:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/applications/$APP_ID/grants

Response:

{
    "paging": {
        "total": 1,
        "limit": 50,
        "offset": 0
    },
    "grants": [
        {
            "user_id": {user_id},
            "app_id": {app_id},
            "date_created": "2012-05-19T01:00:54.000-04:00",
            "scopes": [
                "read",
                "offline_access",
                "write"
            ]
        }
    ]
}

Fields description

  • user_id: user_id: user identifier.
  • app_id: application identifier.
  • date_created: date the authorization was created.
  • scopes: permissions granted to the application: read, write and offline_access.

Revoke user authorization

To remove a user's authorization to your application, you must specify the app_id, user_id and their access token. To do this, do a DELETE as shown in the example below:

curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/$USER_ID/applications/$APP_ID

The response should be:

{
    "user_id":"{user_id}",
    "app_id":"{app_id}",
    "msg":"Autorización eliminada"
}