GuidesHosting choices

Codex "Phone number is required" at sign-in: what to do

Codex sign-in asks for a phone number, says invalid_phone_number or the number is at its account limit: what each means, and running Codex on an API key.

November 14, 2026The Everpod team
The short answer

“Phone number is required” is OpenAI’s account asking for a verified phone number before it lets Codex sign in. It happens on OpenAI’s sign-in pages, in whatever browser you opened the link in, so a server meets it exactly as a laptop does, and nothing on the server or in Codex changes it. Verify a mobile number you own and the sign-in continues. If the number is refused or already used up, that is for OpenAI support to resolve. Codex can also run on an OpenAI API key, with codex login --with-api-key, which uses no ChatGPT sign-in and is billed per use instead of from your plan.

Where it appears

You run codex login, or codex login --device-auth on a server, open the link, sign in to ChatGPT, and instead of the approval screen you get a page asking for a phone number. Accounts that sign in to ChatGPT on the web with no phone prompt meet it too. A report on Codex’s tracker describes exactly that: the device-code sign-in “always requires phone number verification”, while ChatGPT on the web with the same Google account “works normally”, and turning on device code sign-in in ChatGPT’s security settings “does not change the behavior.” The same thread has reports from macOS, an Ubuntu 26.04 machine, a Linux VPS and Windows 11 on ChatGPT Plus, through November 2026, with no answer from a maintainer.

The step belongs to the account. The device-code link opens auth.openai.com in your own browser, on your phone or laptop, and the server only waits for the result. Nothing done on the server takes part in it, whether reinstalling Codex, updating it or moving to another machine: the question is put to the account, wherever Codex runs.

What each message means

One more case has no message of its own: the account already has a number, from years ago, and Codex asks to verify that one. An open issue describes a number “no longer under my control” and a screen that “offers SMS and WhatsApp delivery only”, with no option to change the number. That too is OpenAI support’s, since the account is theirs to change.

Copying ~/.codex/auth.json from a laptop that is already signed in does not skip anything: that sign-in passed the same step, and a copied sign-in has its own trouble once two machines use it. A different block, “contact your workspace admin to enable device code authentication”, is a workspace setting rather than a phone check, and its fix is the admin’s.

Codex on an API key

Codex has two ways to authenticate, and only the ChatGPT one goes through that sign-in. The other is an API key from an OpenAI Platform account, which Codex reads from standard input and saves as the machine’s login:

printenv OPENAI_API_KEY | codex login --with-api-key
codex login status
Copied

For a job run with codex exec, the key can be given for one run instead, and it takes precedence over any saved login:

CODEX_API_KEY=<api-key> codex exec --json "triage open bug reports"
Copied

It is a different product with a different bill, not a way into your ChatGPT plan. Key usage is billed through your OpenAI Platform account “at standard API rates”, per token, and none of it comes out of the Codex usage your plan includes. Codex cloud “requires signing in with ChatGPT”, and other features tied to a ChatGPT workspace are limited or missing. What a plan would have covered instead is in which ChatGPT plans include Codex. For a scheduled job on a server, a key is what OpenAI recommends anyway, and the guide to Codex on a Linux server covers the rest of the setup.

Run Codex on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.