Documentación Mercado Libre

Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.
circulos azuis em degrade

Documentación

Última actualización 02/12/2020

Application manager

Contents

→Applications details
→Private data of your application
→Applications authorized by user
→Users that granted permissions to your application
→Fields description
→Revoke user authorization


Applications details

To access full details about one of your applications, simply include the app_id in the API call.


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

Whenever you want to know more details of your application data, you must do so using the Access Token of the user with whom 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

Applications authorized by user

To access all the applications authorized by a user, just send a GET request as a user_id and access token.


Request:

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

Example:

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

The response would be an array 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 that granted permissions to your application

To access the list of users that granted your app permissions, make the following GET:


Example:

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: The user identifier.
  • app_id: The application identifier.
  • date_created: Date when the authorization was created
  • scopes: Permissions given to the application: read, write and offline_access.

Revoke user authorization

To remove any application you must specify the application id, the user id, and the access token. Just doing a DELETE request using this query:

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"
}