Download OpenAPI specification:
Welcome to the npm registry API documentation!
This is the API documentation for the npm registry. For information about the npm registry, website, and command-line interface, please refer to https://docs.npmjs.com.
Exchange a valid OIDC id_token (provided as a Bearer token) for a short-lived npm registry access token for the specified package.
OIDC Token Requirements:
aud
(audience) claim must be set to npm:registry.npmjs.org
Important: The Bearer token must be an OIDC id_token from an Identity Provider (IdP) npm supports. This endpoint differs from the rest of the API, which expects a standard npm access token.
package_name required | string Name of the npm package, url-encoded |
{- "token_type": "oidc",
- "token": "string",
- "created": "2025-07-18T10:30:00.000Z",
- "expires": "2025-07-18T11:30:00.000Z"
}