# Amp: No API key found. Starting login flow...

> Amp has no stored login and no `AMP_API_KEY`, so it starts a device login and prints a URL with a code. The exact message, why Amp prints it, and the fix.

_Updated November 23, 2026 · Checked against Amp 0.0.1790438457, reproduced in EnvHaven 1.9.0_

## The message

```text
No API key found. Starting login flow...
```

## What it means

Amp has no stored login and no `AMP_API_KEY`, so it starts a device login and prints a URL with a code.

## Fix

1. Open the printed `ampcode.com/auth/cli/device` link on any device, check the code matches, and confirm.
2. For scripts, set `AMP_API_KEY` instead so no login is needed.

## In an EnvHaven workspace

Yes, the first time. Approve it from the same browser tab.

## Where this comes from

This message was produced by Amp (Amp 0.0.1790438457) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.

## Keep reading

- [Amp](https://envhaven.com/agents/amp)
- [Is Amp down?](https://envhaven.com/status/amp)
- [Every agent error](https://envhaven.com/errors)

Source: https://envhaven.com/errors/amp/no-api-key-found
