npm Registry API (1.0.0)

Download OpenAPI specification:

Welcome to the npm registry API documentation!

Introduction

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.

registry.npmjs.org

API endpoints for the npm registry endpoint at registry.npmjs.org.

Exchange OIDC id_token for npm registry token

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:

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.

Authorizations:
bearerAuth
path Parameters
package_name
required
string

Name of the npm package, url-encoded

Responses

Response samples

Content type
application/json
{
  • "token_type": "oidc",
  • "token": "string",
  • "created": "2025-07-18T10:30:00.000Z",
  • "expires": "2025-07-18T11:30:00.000Z"
}