Git Product home page Git Product logo

Comments (5)

rybodiddly avatar rybodiddly commented on June 16, 2024 1

Adding this for others who run into issues with api development: If you proxy the traffic with something like charles or proxyman, you'll notice that the mobile app uses a threat matrix. The api I use just circumvents it and ignores it. But if you spam the server during testing / development with redundant login attempts etc. It will lock you out for a period of time. So when doing development, be sure to have a vpn and a few different accounts to test with, because one usually gets locked down for a short period every so often from repeated and redundant traffic spamming the server. This is why I eventually created the token retention system, it allows the maintenance of a continous session, without numerous and unnecesasry logins.

from kijiji-reposter.

AminDhouib avatar AminDhouib commented on June 16, 2024

I can confirm that the LoginFunction still works on my side. I erased my token.json file, inputted a new set of logins and it worked just fine. Consider using a different account or try again another time perhaps.

from kijiji-reposter.

DudeManGuy0 avatar DudeManGuy0 commented on June 16, 2024

It might somehow be because I uninstalled the Kijiji mobile app. Trying again today it still doesn't work. Idk how to fix this for myself but I'm going to close this issue now.

from kijiji-reposter.

DudeManGuy0 avatar DudeManGuy0 commented on June 16, 2024

That's weird since I didn't spam, at least I don't think so. Also what do you mean by "my api"? We are all using the same api, the mobile api, right? Also, running it through either Winscribe or Phisphon VPN doesn't make a difference

from kijiji-reposter.

rybodiddly avatar rybodiddly commented on June 16, 2024

Not sure what you mean by "my api" either. Don't see that in the previous comment. Are you referring to my statement "The api I use"? If so, just referring to the api calls I actually utilize in the kijijiapi.py file. There were tons more, such as notifications etc. that just weren't implemented.

It's been a while, but I recall similar experiences to what you're experiencing. In my case they happened after successive login attempts. The login attempts may not have been the root cause. Could have been something on the mingle server's end. The mingle server can be extremely buggy and congested at times. But I specifically recall similar issues. I found it would eventually sort itself out and would just use a secondary account for the development until i could log in with my original account. I also ran into it the odd time when testing multiple postings. Chalked it up to the threat metrix evasion or unnecessarily successive login attempts.

The only exposed traffic for logins are as follows:

Request: https://mingle.kijiji.ca/api/users/login

[email protected]&password=YourPassword&socialAutoRegistration=false

Response:

<user:user-logins xmlns:types="http://www.ebayclassifiedsgroup.com/schema/types/v1" xmlns:cat="http://www.ebayclassifiedsgroup.com/schema/category/v1" xmlns:loc="http://www.ebayclassifiedsgroup.com/schema/location/v1" xmlns:ad="http://www.ebayclassifiedsgroup.com/schema/ad/v1" xmlns:pic="http://www.ebayclassifiedsgroup.com/schema/picture/v1" xmlns:user="http://www.ebayclassifiedsgroup.com/schema/user/v1" xmlns:feat="http://www.ebayclassifiedsgroup.com/schema/feature/v1" xmlns:attr="http://www.ebayclassifiedsgroup.com/schema/attribute/v1" xmlns:vid="http://www.ebayclassifiedsgroup.com/schema/video/v1" xmlns:notice="http://www.ebayclassifiedsgroup.com/schema/notice/v1" xmlns:rate="http://www.ebayclassifiedsgroup.com/schema/rate/v1" xmlns:reply="http://www.ebayclassifiedsgroup.com/schema/reply/v1" xmlns:feed="http://www.ebayclassifiedsgroup.com/schema/feed/v1" xmlns:payment="http://www.ebayclassifiedsgroup.com/schema/payment/v1" xmlns:payment-v2="http://www.ebayclassifiedsgroup.com/schema/payment/v2" xmlns:order="http://www.ebayclassifiedsgroup.com/schema/order/v1" xmlns:notif="http://www.ebayclassifiedsgroup.com/schema/notifications/v1" xmlns:counter="http://www.ebayclassifiedsgroup.com/schema/counter/v1" xmlns:flag="http://www.ebayclassifiedsgroup.com/schema/flag/v1" xmlns:sug="http://www.ebayclassifiedsgroup.com/schema/suggestion/v1" xmlns:stat="http://www.ebayclassifiedsgroup.com/schema/stat/v1" xmlns:vrn="http://www.ebayclassifiedsgroup.com/schema/vrn/v1" version="1.90" locale="en_CA">
	<user:user-login>
		<user:id>0123456789</user:id>
		<user:email>[email protected]</user:email>
		<user:token>1AQAAAXiVB4AAAAoAkzE2MH78HKKHIEFHKFEk8ejkfkhmNlZGVuQHlhaG9vLmNhOyQyJE9VVmRXam13X09NZUttRG1Lc0hiV2ZQeDk1bzFVdGFHbVU1SkxCRWR4cDgtJEtLRDlhenp2dm80NEhkNkp5bTFsQzBicnNDUjUwakZRcUJ1L0xXQ0hnejhHYF6hefkkewf0MDc7QVBJX0xPR0lOOzsmNmUX8Na27OpkN9Q0lw/VH0</user:token>
	</user:user-login>
</user:user-logins>

No known or exposed token validation api. The token just gets fed into all the other calls.

Also, here's a much simpler version of the login function from an earlier version prior to the implementation of the token retention system.

def loginFunction(session, email, password):
	
	# Login Header
	headers = {
		'content-type':'application/x-www-form-urlencoded',
		'accept':'*/*',
		'x-ecg-ver':'1.63',
		'x-ecg-ab-test-group':'',
		'accept-language':'en-CA',
		'x-ecg-udid':'YOUR DEVICE ID GOES HERE',
		'accept-encoding':'gzip',
		'x-threatmetrix-session-id':'YOUR THREATMETRIX ID GOES HERE',
		'user-agent':'Kijiji 12.6.0 (iPhone; iOS 13.3.1; en_CA)'
		}

	payload = {'username': email, 'password':password, 'socialAutoRegistration': 'false'}

	r = session.post('https://mingle.kijiji.ca/api/users/login', headers = headers, data = payload)

	# if kijiji response valid attempt to parse response
	if r.status_code == 200 and r.text != '':
		parsed = xmltodict.parse(r.text)
		userID = parsed['user:user-logins']['user:user-login']['user:id']
		userToken = parsed['user:user-logins']['user:user-login']['user:token']
		return userID, userToken
	else:
		parsed = xmltodict.parse(r.text)
		print(parsed)

from kijiji-reposter.

Related Issues (20)

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.