0.1.4 • Published 2 years ago

@inboundlabs/booya-api-client v0.1.4

Weekly downloads
21
License
ISC
Repository
github
Last release
2 years ago

Booya API Client

Node.js Client Library for Booya 2.0 API

Installation

# npm 
npm install --save @inboundlabs/booya-api-client
 
# yarn 
yarn add @inboundlabs/booya-api-client

Initialize API Client

const BooyaClient = require('@inboundlabs/booya-api-client');
 
// Initialize
const appId = 'inboundlabs'; // Replace with your appId from https://go.booya.io
const booyaClient = new BooyaClient(appId);

Usage

Verify Token

const token = '<user token here>'; // Replace with code to retrieve token e.g from request body or headers
booyaClient.verify(token).then(response => {
    const user = response.user;
    // Do authenticated stuff
}).catch(err => {
    console.error('error => ', err);
    // Handle authentication error
});
0.1.4

2 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago