#Login to openai-codex

1 messages ยท Page 1 of 1 (latest)

ashen cypress
#

openclaw models auth login --provider openai-codex --method device-code

๐Ÿฆž OpenClaw 2026.4.23 (a979721) โ€” Open source means you can see exactly how I judge your config.

โ”‚
โ—’ Requesting device codeโ€ฆโ”‚
โ—‡ OpenAI Codex device code โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Open this URL in your LOCAL browser and enter the code below. โ”‚
โ”‚ URL: https://auth.openai.com/codex/device โ”‚
โ”‚ Code: [shown on the local device only] โ”‚
โ”‚ Code expires in 15 minutes. Never share it. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Open this URL in your LOCAL browser:

https://auth.openai.com/codex/device

this doesn't display the code

I am on AWS lightsail

๐Ÿฆž OpenClaw 2026.4.23

I tried a few other variations with script and such I cant get the code to display so I can put it in the browser on my machine and log in

rotund matrixBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

woeful apexBOT
#

Yep โ€” on AWS/SSH that output is expected-but-confusing. OpenClaw detects a remote/headless environment and intentionally redacts the device code, so --method device-code isnโ€™t the right path there.

Use the normal OAuth flow instead:

openclaw models auth login --provider openai-codex

Then:

  1. Copy the printed auth URL into your local browser.
  2. Sign in.
  3. When it redirects to 127.0.0.1 / fails to connect locally, copy the full address bar URL.
  4. Paste that back into the VPS prompt.

That flow is designed for remote/headless login. Docs: https://docs.openclaw.ai/concepts/oauth

#

If that still fights you, alternate route: log in on a local machine, then copy the matching agentโ€™s auth-profiles.json to the VPS. It contains OAuth secrets, so treat it like a password.