@inboundlabs/booya-api-client

0.1.4 • Public • Published

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
});

Readme

Keywords

Package Sidebar

Install

npm i @inboundlabs/booya-api-client

Weekly Downloads

2

Version

0.1.4

License

ISC

Unpacked Size

2.09 kB

Total Files

3

Last publish

Collaborators

  • davidsemakula
  • sapikachu