zxol / airbnbapi

Unofficial airbnb.com REST API wrapper for node.js
MIT License
218 stars 52 forks source link

Token is not generating #42

Open goppi1 opened 4 years ago

goppi1 commented 4 years ago

Hi,

I am trying to get token for airbnb and it returning null in response. Here is the code I am using airbnb.login({ username: 'xxxxx', password: 'xxxxx }).then(function(data) { console.log('data: ', data); })

It returning null in console.

airbnb.newAccessToken({ username: 'xxxxxx', password: 'xxxxxx' }).then(function(data) { console.log('data: ', data); })

Above code returning error:- data: { error: { error_code: 420, error: 'unknown_error', error_message: 'Unable to perform action. Please try again through the website or contact support if you need immediate assistance.' } }

Please help me and let me know where I am doing wrong.

wazcov commented 4 years ago

I'm also getting this with a new airbnb account

igorzelaya commented 4 years ago

Same here. Maybe its because my user is linked with my gmail account? Its yours also linked?

bobmarley29 commented 4 years ago

i've started using this lib https://github.com/drawrowfly/airbnb-private-api . its does not have many endpoint support as this one but it works great at least for the token part

itbankas commented 4 years ago

Yes there is another way to get token via v2/authentications a bit different json post old one /logins (often goes down) body: { authenticationParams: { ...(type === 'email' ? { email: { email: this.email, password: this.password, }, } : { phone: { deliveryMethod: 'TEXT', isCombinedFlow: false, isGlobal: true, otp: code, phoneNumber: this.phone, }, }), }, metadata: { sxsMode: 'OFF', }, },