Coder Social home page Coder Social logo

python-sdk's Issues

Problem redirect getting authorization token

When i try to run the example of the authorization code it redirect me into a login page like this one:
https://www.mercadolibre.com/jms/mla/lgz/login/?go=https%3A%2F%2Fauth.mercadolibre.com.ar%2Fauthorization%3Fclient_id%3D479%26redirect_uri%3Durl.com.ar%26response_type%3Dcode&platform_id=ml&application_id=479939650732
This one contains fake parameters, but is where https://auth.mercadolibre.com.ar/authorization requesting this url leads me.
Is there a way to make that login with a request?
For the moment i solved it using Selenium, but i think is no the best way.

Please, make this Python 3 compatible

Hi!,

I think the code should be more compatible with Python3 these days, since Python2 "only" is getting old...

Also seems this SDK is the "less maintained" than all others SDK offered by ML...

Issue In Redirect URI

Hi,

I have an issue related with redirect uri. currently i am trying to integrate my application which is running on my local with url 'http://localhost:8069' .

Error: i am getting RedirectURI is not define.

Can you please provide some suggesation on how can i define the redirect URI while calling the auhorize function of mercadolibre. and application i already created on mercadolibre.

Thanks

ERROR 400 Backslash problem Replacement of / with %2F (SOLVED temporarily)

Hi !

I have a problem when i try:

resource=orders/search/recent?seller=$SELLER_ID

this:
https://api.mercadolibre.com/orders/search/recent?seller=$SELLER_ID&access_token=$ACCESS_TOKEN
became this:
https://api.mercadolibre.com/orders%2Fsearch%2Frecent%3Fseller%3D$SELLER_ID
and throw error 400 (backslash problem)

SOLVED editing in file: rest.py

url=url.replace("%2F",'/')
url=url.replace("%3F",'?')
url=url.replace("%3D",'=')

saludos

Better support for files upload

Since this API SDK is using requests, I think would be better to post files as requests way: http://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file

Using this method, requests will send a multipart/form-data.

EDIT: temporary I had to create a own method by using pycurl (which works), since using requests (from this API) and param files (added to the post method), the response status is 500.

The code for pycurl: https://stackoverflow.com/a/53547438/6696269

get_access_token performs unnecessary requests to oauth service

The oauth service returns:

{"access_token":"APP_USR-35766...90-102411-54bb20457...c10b5a230138dec__D_A__-108758138",
"token_type":"bearer",
"expires_in":10800,
"scope":"offline_access read write",
"refresh_token":"TG-5269...b0a34eb0ddf3a9"}

The access_token has an expiration (10800), at least during that time it shouldn't be necessary to send a new POST to the oauth service and get the token again. Implementing this will lower the load of MELI's oauth service and make the python-sdk faster to use since for most actions it's sending 2 HTTP requests (oauth+real action) and if the expiration is taken into account only 1 HTTP request will be sent in most cases.

Timeout

Bom dia,

Ativei o envio de notificações para a minha aplicação.
No começo estava recebendo timeout quando consultava o feed e não recebia os POST´s das notificações.
Depois de um dia ou dois passei a receber OK os POST´s, porém com reqtime elevado, cerca de 2~3s mesmo que eu estivesse tratando e enviando 200 imediatamente.
Agora voltou a dar timeout.
Alguém já passou por isto?
Minha aplicação está rodando no raspberry pi na empresa, utilizando dns do google domains na rede da Vivo.

Subi um serviço da Clouflare chamado Workers, e redirecionei as notificações para lá apenas para testar se desta vez funciona ok.

Obrigado.

hello guys, i need some help

hello guys, i need some help, can i use this API without a website? i wanned to make an local app with pyqt5, and connect to the API, can i do that?

Support no longer available? Problema at GET myfeeds

Hi, tried to open a new ticket at support.
But receive the message that is only for partners now.
It´s true? How can I became partner?

I would like to ask about GET on myfeeds, I´m receiving [] at return.

Absolute changes of this SDK without any notice

As I can see, the code has changed absolutely and no notice even in readme.md so now many old issues will die in the air.

What is going on with you guys at Mercado Libre? That bad is the developers team organization and you don't event know how software development steps must be?

I just notice this and that now (for better) is a python package. You should be more informative about this big change (I don't event know when this happened. Just browsing this repos is there was any changes, just by chance).

Put your house in order ML...

No apparent way of passing extra headers to get method

With the implementation of the shopping cart coming soon, we need to pass the extra header x-format-new: true to be able to parse the new orders JSON. However, there doesn't seem to be a way to do this at the moment of writing this.

Not Python3 compatible

This line is not Python3 compatible... why you still using Python2 in mind?

raise Exception, "Offline-Access is not allowed."

Refer to existing #11 and #23 (and pull request #31) which does not have any response at all.

This seems like a very "abandoned/not care" SDK...

Using resource_get for currency_conversion, classified_locations and other modules

When resource_get for currency_conversion, classified_locations and other modules:

def get_local_currency_by_country_id( country_id ):

	query = "/classified_locations/countries/{}".format( country_id )

	try:

		response = api_instance.resource_get(query, CLIENT_SECRET)

		return json.dumps( response )

	except ApiException as e:

		pass

	return None

I get the following error message:

{"message":"{\"message\":\"Malformed access_token: MY-SECRET-TOKEN TEST\",\"error\":\"bad_request\",\"status\":400,\"cause\":[]}","error":"","status":400,"cause":[]}

Uploading images using python-sdk's resource_post

How do I pass the "content-type" and "file" parameters using the .resource_post method?
As in :

curl -X POST  -H 'Authorization: Bearer $ACCESS_TOKEN'  \
-H 'content-type: multipart/form-data' \
-F 'file=@FILE' \
https://api.mercadolibre.com/pictures/items/upload

Issue on generating the token

Hi,

I tried to call authorize function for generating the token founding the error below.

Can you please help me on it.

Thanks
Arpit

meli.authorize('TG-5a58c14fe4b0ff39be25d772-295295916', redirect_URI="https://bb6b4a5f.ngrok.io")
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/melipy/core.py", line 49, in inner
File "build/bdist.linux-x86_64/egg/melipy/core.py", line 89, in authorize
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 840, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.mercadolibre.com/oauth/token?code=TG-5a58c14fe4b0ff39be25d772-295295916&client_secret=Fn9k3FXuyPw921whwdtXJDAbGp2Ax4t9&grant_type=authorization_code&client_id=5961429306344932&redirect_uri=https%3A%2F%2Fbb6b4a5f.ngrok.io

is there a way to get an article search ?.

Hi everyone
I would like to know if there is a way to consult the API and obtain for example a property search, or some sports article. I would also like to get sales and visits. I use anaconda and Jupyternotebook, python 3. Can anyone help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.