{"id":48754,"library":"node-marketo-rest-client-ng","title":"Marketo REST Client (Next Gen)","description":"A Node.js client library for interacting with the Marketo REST API. Version 1.0.4 targets Node >=14.17.6 and is a fork of the MadKudu/node-marketo library that adds support for lead.submitForm and debug logging for Marketo API responses. It provides methods for leads, campaigns, custom objects, and more, but lacks TypeScript types and comprehensive documentation. The package has not seen recent updates, but the underlying API is stable.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/johnny-the-coder/node-marketo-ng","tags":["javascript"],"install":[{"cmd":"npm install node-marketo-rest-client-ng","lang":"bash","label":"npm"},{"cmd":"yarn add node-marketo-rest-client-ng","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-marketo-rest-client-ng","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"self-package","package":"node-marketo-rest-client-ng","optional":false}],"imports":[{"note":"ESM import works; CommonJS require also works as package supports both.","wrong":"const Marketo = require('node-marketo-rest-client-ng')","symbol":"default","correct":"import Marketo from 'node-marketo-rest-client-ng'"},{"note":"CommonJS require returns the constructor function directly.","wrong":"","symbol":"Marketo","correct":"const Marketo = require('node-marketo-rest-client-ng')"},{"note":"No named type export; use default import for type if using ts.","wrong":"import { Marketo } from 'node-marketo-rest-client-ng'","symbol":"Marketo type","correct":"import type Marketo from 'node-marketo-rest-client-ng'"}],"quickstart":{"code":"import Marketo from 'node-marketo-rest-client-ng';\n\nconst client = new Marketo({\n  endpoint: process.env.MARKETO_ENDPOINT ?? '',\n  identity: process.env.MARKETO_IDENTITY ?? '',\n  clientId: process.env.MARKETO_CLIENT_ID ?? '',\n  clientSecret: process.env.MARKETO_CLIENT_SECRET ?? ''\n});\n\nasync function getLeads() {\n  try {\n    const leads = await client.lead.getLeads({\n      filterType: 'id',\n      filterValues: '1,2,3'\n    });\n    console.log('Leads:', leads);\n  } catch (err) {\n    console.error('Error:', err);\n  }\n}\n\ngetLeads();","lang":"typescript","description":"Initializes a Marketo client using environment variables and fetches leads by IDs."},"warnings":[{"fix":"Ensure endpoint is REST endpoint (e.g., https://xxx.mktorest.com/rest) and identity is OAuth endpoint (https://xxx.mktorest.com/identity).","message":"Marketo API authentication requires separate identity endpoint from REST endpoint.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pass formId as integer: await client.lead.submitForm({ formId: 1234, input: [...] });","message":"lead.submitForm method expects formId as number, not string.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check updated README for constructor parameters; original library used different property names.","message":"This fork changes constructor options compared to original MadKudu library.","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.4':18 '14.17.6':21 'add':31 'api':16,40,69 'campaign':47 'client':3,8 'comprehens':57 'custom':48 'debug':36 'document':58 'fork':25 'gen':5 'interact':11 'javascript':72 'lack':53 'lead':46 'lead.submitform':34 'librari':9,29 'log':37 'madkudu/node-marketo':28 'marketo':1,14,39 'method':44 'next':4 'node':20 'node.js':7 'object':49 'packag':60 'provid':43 'recent':64 'respons':41 'rest':2,15 'seen':63 'stabl':71 'support':32 'target':19 'type':55 'typescript':54 'under':68 'updat':65 'version':17","created_at":"2026-06-07T16:58:17.167518+00:00","updated_at":"2026-06-07T16:58:17.167518+00:00","problems":[{"fix":"Ensure Marketo client is instantiated with valid credentials and await any initial auth step if needed.","cause":"Client not properly initialized or method called before authentication.","error":"TypeError: client.lead.getLeads is not a function"},{"fix":"Verify MARKETO_CLIENT_ID and MARKETO_CLIENT_SECRET environment variables and check token refresh logic.","cause":"Invalid client ID or secret, or expired access token.","error":"Marketo API returns 401 Unauthorized"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/johnny-the-coder/node-marketo-ng#readme","github":"https://github.com/johnny-the-coder/node-marketo-ng","docs":null,"changelog":null,"pypi":null,"npm":"node-marketo-rest-client-ng","openapi_spec":null,"status_page":null,"smithery":null,"categories":["crm"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}