tejado / ebk-client

eBay Kleinanzeigen/Classifieds API client
MIT License
98 stars 18 forks source link

Account gets locked after API login #22

Open muleyo opened 2 years ago

muleyo commented 2 years ago

Anyone knows how to prevent that? I get forced to reset my password everytime I login via API.

Using it on my local machine, so IP-address is the same.

2konrad commented 2 years ago

I had the same issue - account blocked after one successful run of example.py. What could be the reason? https://github.com/exislow/kleinanzeigen-magic ist running fine.

I compared the headers and the only difference seems to be the 'Content-Type': 'application/xml'. I need to check this after my account in unblocked. Any other thoughts?

muleyo commented 2 years ago

Yup can confirm, with that additional sent header, my account is not getting blocked anymore!

2konrad commented 2 years ago

Great news - i will try it soon as well.

2konrad commented 2 years ago

I tried it but didn’t work. Just adding the content type header was not enough. Next I will try to have just the headers that https://github.com/exislow/kleinanzeigen-magic is using. Which headers did you use?

cloudmaker97 commented 2 years ago

I've removed a header after encountering this issue. It seems so that this header is deprecated: X-EBAYK-WENKSE-SESSION-ID and triggers the risk management for chaning the password. The header was introduced in this commit: https://github.com/tejado/ebk-client/commit/62ba68d67fa1157e19241f8826641d1acb33fbde. Maybe the author @felixb can tell us something about it.

My working code looks like this:

header = {
    'X-EBAYK-APP': self.H_EBAYK_CLIENT_APP,
    'X-ECG-USER-VERSION': self.H_EBAYK_CLIENT_VERSION,
    'X-ECG-USER-AGENT': self.H_EBAYK_CLIENT_TYPE,
    'Authorization': 'Basic {}'.format(app_auth),
    'X-ECG-Authorization-User': user_auth,
    'User-Agent': self.H_EBAYK_CLIENT_UA,
}
felixb commented 2 years ago

@cloudmaker97 I've just adapted the js code referenced here: #14.