{"id":18786,"library":"shopify-node-api","title":"shopify-node-api","description":"Node.js module for Shopify API OAuth2 authentication and REST requests. Version 1.11.1 provides support for public and private Shopify apps, handling OAuth token exchange, signature verification, and CRUD operations. It is an older, unmaintained library with minimal updates since 2016. Compared to alternatives like shopify-api-node or @shopify/shopify-api, it lacks TypeScript support, modern API features, and active maintenance.","status":"abandoned","version":"1.11.1","language":"javascript","source_language":"en","source_url":"https://github.com/BKnights/shopify-node-api","tags":["javascript","Shopify","api","node.js","oauth2"],"install":[{"cmd":"npm install shopify-node-api","lang":"bash","label":"npm"},{"cmd":"yarn add shopify-node-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add shopify-node-api","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CJS-only; does not support ESM imports.","wrong":"import shopifyAPI from 'shopify-node-api';","symbol":"shopifyAPI","correct":"const shopifyAPI = require('shopify-node-api');"},{"note":"Must use 'new' keyword when instantiating; omitting it may cause silent failures.","wrong":"const Shopify = shopifyAPI({ shop: '...' });","symbol":"Shopify instance","correct":"const Shopify = new shopifyAPI({ shop: '...', shopify_api_key: '...' });"},{"note":"buildAuthURL is an instance method, not a static method.","wrong":"shopifyAPI.buildAuthURL();","symbol":"buildAuthURL","correct":"Shopify.buildAuthURL();"}],"quickstart":{"code":"const shopifyAPI = require('shopify-node-api');\n\nconst Shopify = new shopifyAPI({\n  shop: 'my-shop',\n  shopify_api_key: process.env.SHOPIFY_API_KEY ?? '',\n  shopify_shared_secret: process.env.SHOPIFY_SECRET ?? '',\n  shopify_scope: 'write_products',\n  redirect_uri: 'http://localhost:3000/finish_auth',\n  nonce: 'random-nonce'\n});\n\n// Build authorization URL\nconst authUrl = Shopify.buildAuthURL();\nconsole.log('Authorize at:', authUrl);\n\n// After Shopify redirects back, exchange temporary token\napp.get('/finish_auth', (req, res) => {\n  Shopify.exchange_temporary_token(req.query, (err, data) => {\n    if (err) return res.status(500).send(err.message);\n    // access_token available in data.access_token\n    res.send('Authenticated!');\n  });\n});","lang":"javascript","description":"Shows OAuth flow: initialize, build auth URL, exchange token for permanent access."},"warnings":[{"fix":"Always pass a valid config object: 'new shopifyAPI({...})'","message":"Constructor throws error if no config object passed","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Manually set 'config.access_token = data.access_token' after callback","message":"Access token in config is not updated automatically after exchange_temporary_token","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use '@shopify/shopify-api' instead for up-to-date security","message":"OAuth signature verification uses outdated HMAC-SHA256","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Generate a cryptographically random nonce for each auth request","message":"Nonce is required but not validated; must be unique per request","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always check 'err' parameter in callbacks; wrap in try-catch","message":"HTTP request errors may not propagate correctly","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"const Shopify = new shopifyAPI({ shop: '...', shopify_api_key: '...' });","cause":"Instantiating without a config object","error":"Error: ShopifyAPI module expects a config object"},{"fix":"Use 'new shopifyAPI()' instead of 'shopifyAPI()'","cause":"Calling methods on undefined instance if 'new' keyword omitted","error":"Cannot read property 'get' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}