npm
Packages, versions, organizations and security advisories
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
API key
Your users enter
- Granular access token (npm_…)SecretRequired
Where to find them
- At npmjs.com: your avatar → “Access Tokens” → “Generate New Token” → “Granular Access Token”.
- Give it a name and expiration and, under “Packages and scopes”, choose “Read-only” (“Read and write” only if you will publish); optionally, limit it to specific packages, scopes or organizations and to your IPs.
- Click “Generate token” and copy it (npm_…): it is shown only once. The lifetime of tokens with write permission is limited: note when it expires so you can renew it.
Tools (2)
npm API request
NPM_SEND_REQUESTAuthenticated call to the npm API (https://registry.npmjs.org). Any endpoint of the API is allowed. Scoped packages: @scope%2Fname. Examples: GET /{package} (metadata, versions and maintainers; with the header Accept: application/vnd.npm.install-v1+json, abbreviated version), GET /{package}/latest, GET /-/v1/search?text=…&size=20, GET /-/package/{package}/dist-tags, GET /-/org/{org}/package, GET /-/org/{org}/user, POST /-/npm/v1/security/advisories/bulk {"package": ["1.2.3"]}, GET https://api.npmjs.org/downloads/point/last-month/{package} (downloads).
Required scopes
No scopes required
Input
npm API request input Name Type Description methodstringHTTP methodOne of: GET,POST,PUT,PATCH,DELETEDefault:"GET"pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link) queryobjectQuery string parameters bodyunknownJSON body formobjectBody as application/x-www-form-urlencoded instead of JSON body_base64stringBinary body, base64 (at most 960000 characters) content_typestringContent-Type of body_base64 headersobjectExtra headers such as Accept. Authentication is added automatically. Known package vulnerabilities
NPM_AUDIT_PACKAGESLooks up the npm registry's security advisories (the same ones npm audit uses) for specific packages and versions. Returns, per package, the advisories that affect those versions (severity, title, vulnerable range, CVSS, CWE and GHSA link) and the list of packages without advisories.
Required scopes
No scopes required
Input
Known package vulnerabilities input Name Type Description packagesrequiredobjectPackages and versions to check, e.g. {"lodash": ["4.17.20"], "@angular/core": ["15.0.0"]}

