JavaScript/TypeScript client for the Bkper REST API, providing classes and functions for authentication, authorization, and data manipulation. Current stable version is 2.35.2, released on npm with regular updates. It supports Node.js and modern browsers, ships TypeScript definitions, and offers CDN usage without build tools. Key differentiators include simple OAuth token provider configuration, compatibility with @bkper/web-auth for *.bkper.app subdomains, and a Bkper CLI for token management.
npm install bkper-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize Bkper with OAuth token from CLI and retrieve a book by ID.
Use CDN/browser approach with access token for other domains.
Use Node.js >=10 or modern browser; if using old Node, stay on 1.x.
Pass config to constructor: new Bkper({ oauthTokenProvider: ... })Run 'bkper auth token' again or integrate OAuth refresh flow.
Run: npm install bkper-js
Use global 'bkperjs' (not 'bkper') and ensure script tag with src points to CDN.
Call Bkper.setConfig({ oauthTokenProvider: async () => ... }) before creating instance.