A Node.js library for communicating with Magento 2 sites via their REST API using OAuth 1.0a authentication. Version 0.0.2 is the latest and only release. This library is early-stage and incomplete, covering only a subset of Magento 2 API endpoints. It uses promises (unlike callback-based alternatives) and supports categories, products, and customer operations. The project appears to be abandoned with no recent commits.
npm install magento2-rest-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the client with OAuth credentials and fetches the category list.
Extend the library or use the official Magento 2 REST API with a generic HTTP client.
Use 'magento2-api' or 'magento2-rest-client-kirchberger' as alternative maintained libraries.
Use destructuring: const { Magento2Client } = require('magento2-rest-client');Ensure your Magento 2 integration is configured for OAuth 1.0a, or use another library that supports Bearer tokens.
Replace 'const Magento2Client = require('magento2-rest-client');' with 'const { Magento2Client } = require('magento2-rest-client');'Run 'npm install magento2-rest-client' from the project root.
Check that the Magento 2 REST API endpoint URL is correct and the library supports the required version.