Last updated

login

Introduction

Use the login command to authenticate to the API registry.

When you log in, the preview-docs command starts a preview server using Redocly API reference docs with all of the premium features. Users who are not logged in see a Redoc community edition version of their documentation.

After logging in, you can also access your members-only (private) API descriptions in the Redocly registry, and use the push command.

If you're having issues with the login command, use the --verbose option to display a detailed error trace (if any).

Usage

Note

To log in, a personal API key is required. See generate a personal API key.

redocly login [--help] [--verbose] [--version]

redocly login --verbose

Options

OptionTypeDescription
--configstringSpecify path to the configuration file.
--helpbooleanShow help.
--region, -rstringSpecify which region to use when logging in. Supported values: us, eu. The eu region is limited to enterprise customers. Default value is us.
--verbosebooleanDisplay additional output.
--versionbooleanShow version number.

Examples

View successful login message

A confirmation message is displayed with a successful login:


redocly login
  🔑 Copy your API key from https://app.redocly.com/profile and paste it below:

  Logging in...
  Authorization confirmed. ✅

View failed login message

An error message is displayed with a failed login:


redocly login
  🔑 Copy your API key from https://app.redocly.com/profile and paste it below:

  Logging in...
  Authorization failed. Please check if you entered a valid API key.