node-bigcommerce is a comprehensive Node.js module designed for integrating applications with the BigCommerce API. It facilitates OAuth 2.0 authentication, handles authorization flows, verifies signed payloads for app load/uninstall events, and provides convenient helper methods for executing various API requests (GET, POST, PUT, DELETE). The current stable version is 4.1.0. While the release cadence is moderate, major versions introduce breaking changes such as the significant refactor in v3.0.0 to exclusively use Promises and the dropping of older Node.js versions. A key differentiator is its streamlined approach to BigCommerce-specific authentication mechanisms and direct support for different API versions (v2 and v3). Since v3.0.0, it leverages ES6 classes and standard Promises, moving away from callback-based patterns.
npm install node-bigcommerceVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `node-bigcommerce` with Express.js to handle both OAuth authorization and verify signed payloads for app load/uninstall events, showcasing key authentication flows.
Refactor all API calls and authorization flows to use `.then()`/`.catch()` or `async/await` syntax instead of callbacks.
Update all instances of `bigCommerce.authorise(...)` to `bigCommerce.authorize(...)`.
Wrap `bigCommerce.verify(...)` calls in a `try...catch` block to handle verification errors.
Remove any direct `logLevel` or logger configurations. To enable debug output, set the environment variable `DEBUG=node-bigcommerce:*` before running your application.
Upgrade your Node.js runtime environment to version 10 or higher for full compatibility and support.
Always provide a configuration object to the `BigCommerce` constructor, even if some properties are set to empty strings or obtained from environment variables.
Upgrade to version 3.1.0 or newer to ensure protection against this timing attack vulnerability.
Rename `bigCommerce.authorise` to `bigCommerce.authorize`.
Pass a configuration object to the `BigCommerce` constructor, e.g., `new BigCommerce({...})`.Ensure `bigCommerce.authorize(req.query)` is called with the full query parameters from the BigCommerce redirect, and handle the promise rejection with a `.catch()` block.
Ensure `bigCommerce.verify(req.query['signed_payload'])` is called with the correct `signed_payload` string passed by BigCommerce, and that the `secret` configured for the `BigCommerce` instance matches your BigCommerce app secret.
No dependency data recorded yet.