airbnbapi icon indicating copy to clipboard operation
airbnbapi copied to clipboard

Token is not generating

Open goppi1 opened this issue 5 years ago • 4 comments

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.

goppi1 avatar Dec 26 '19 07:12 goppi1

I'm also getting this with a new airbnb account

wazcov avatar Jan 06 '20 10:01 wazcov

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

igorzelaya avatar Jan 24 '20 05:01 igorzelaya

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

bobmarley29 avatar Feb 22 '20 21:02 bobmarley29

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', }, },

itbankas avatar Mar 04 '20 09:03 itbankas