tomquirk / linkedin-api

👨‍💼Linkedin API for Python
MIT License
1.72k stars 401 forks source link

CHALLENGE #253

Open tbressers opened 1 year ago

tbressers commented 1 year ago

Dear all,

I have the following "challenge":

  1. I logged in (authenticated) for account "A" using linkedin-api several times and did a lot of searches during each session
  2. At a certain moment, I got the famous "CHALLENGE" in return of my login request for account "A"
  3. I logged in for account "A" via a web-browser (same IP used as tests above) and indeed I got the "challenge" questions
  4. So, I correctly identified the rotation of the deer and I entered the code which I got via e-mail, and after that, I could use LinkedIn as normal within the web-browser!
  5. However: Logging in via linkedin-api (same account "A", same IP) still gives the "CHALLENGE" response!

This makes me think, that our linkedin-api Voyager API call parameters for 'authenticate', are slightly different from the official LinkedIn Voyager API call parameters for 'authenticate'.

Does that make sense? And if so, can we make our 'authenticate' identical to the 'authenticate' as used by LinkedIn? (It might solve the CHALLENGE :-)

Best regards - Thijs

ps: I only used username/password to log in. No cookies where stored or used.

sotosoul commented 1 year ago

Similar story here, but without any successful logins (via API) whatsoever.

I'm using a very basic script:

from linkedin_api import Linkedin

api = Linkedin('user@username.com', 'my_super_secret_password')

...which keeps returning the CHALLENGE error. This is my personal account and LinkedIn works fine in the browser on the very same computer. Not sure what the issue is, however, data['challenge_url'] of the response JSON looks like this:

https://www.linkedin.com/checkpoint/lg/direct-login-submit?addDetailedLoginResult=add&dropLiatCookie=drop&csrfToken=ajax%3A4286736871597817210&pSIdString=c1f514d6-272a-49d1-8ca0-e43e7311e05f&ut=35B77ODnI1Qqo1

...and does not point to anything meaningful—just a 404 page.

Any thoughts?

manuelrech commented 1 year ago

it happened to me because i was temporarily restricted on linkedin, probably you make too many API calls