Skip to content

Category: Authorization

Andy Mac edited this page Apr 28, 2018 · 1 revision

testAuth

Test a token

airbnb.testAuth('faketoken3sDdfvtF9if5398j0v5nui')
// returns bool

newAccessToken

Request a new token

airbnb.newAccessToken({username:'[email protected]', password:'hunter2'})
// returns {token: 'faketoken3sDdfvtF9if5398j0v5nui'} or {error: {error obj}}

login

Request a new token (v2 endpoint). Similar to the above function but returns a user info summary with much more information.

airbnb.login({username:'[email protected]', password:'hunter2'})
// returns a user info object (includes token) or {error: {error obj}}

TODO: support other login methods