nderkach / airbnb-python

A Python wrapper around the Airbnb API (unofficial)
Do What The F*ck You Want To Public License
186 stars 66 forks source link

VerificationError #3

Closed Patrick3131 closed 5 years ago

Patrick3131 commented 6 years ago

Hey,

I can not login with the api and my e-mail + pw. I get this error: "raise VerificationError"

Is it still working for you? Airbnb recently uses more and more verification processes, could this be the problem?

Thanks!

ShakeM commented 6 years ago

The API are from IOS APP. And they works well and stable, which I have used at least for nearly one year. Maybe you could have a try to use your phone number to login in instead of e-mail.

Patrick3131 commented 6 years ago

Hm okay, thanks for the answer. The phone number does not work either.

Also after my login attempt with the api, I get the robot check if I want to login on airbnb.com directly.

This is the code I tried to log in, did I maybe forget something?

import requests
import json
from datetime import datetime
from airbnb import Api

login = "test@gmail.com"
password = "passwort123"

api = Api(login, password)

profil = api.get_profile() 

Well thanks, anyways.

pabloparejo commented 6 years ago

I am getting the same error, any ideas?

Thanks!

Patrick3131 commented 6 years ago

I still could not resolve it, I am still guessing it is because of airbnbs additional checks. Though I did not have any closer look.

pabloparejo commented 6 years ago

It seems airbnb login endpoint is limited to 10 requests/hr. The solution then is to store OAuth token in DB or maybe a file, as this token doesn't seem to expire. If you keep getting 420 errors over and over, try to login to airbnb via the web and then call /login endpoint again to store the key locally PS: @nderkach I noticed your API_KEY has been added to the repo, I'd keep that private just in case..

nderkach commented 6 years ago

The issue is caused by AIrbnb throttling login requests, I imagine their fraud detection system might also fingerprint your client. Good news is that you don't need to log in with your credentials that often. Once you authenticated the first time (i.e. with Api(login, password), you can just reuse the same access_token for subsequent requests. You can also initiate the Api object like this Api(access_token=<token>).

@pabloparejo the API_KEY appears to be the same for all mobile clients.

AveryData commented 2 years ago

fyi i'm getting this error on my first time trying to use the repo.....