Skip to content

在配置 Codex输入 cli-proxy-api --codex-login一直报403,无法看到认证文件生成并保存成功。 #2154

@linzy66

Description

@linzy66

PS D:\浏览器\1API\CLIProxyAPI-main\CLIProxyAPI-main> .\cli-proxy-api.exe --codex-login
CLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
[2026-03-16 02:30:05] [--------] [info ] [main.go:426] CLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
Opening browser for Codex authentication
Attempting to open URL in browser: https://auth.openai.com/oauth/authorize?client_id=app_EMoamEEZ73f0CkXaXp7hrann&code_challenge=8F6tfwAYXls2muwaoUQmwUCG9u7hLaC_z7yBoCFk9BQ&code_challenge_method=S2Waiting for Codex authentication callback...
Paste the Codex callback URL (or press Enter to keep waiting):

PS D:\浏览器\1API\CLIProxyAPI-main\CLIProxyAPI-main> .\cli-proxy-api.exe --codex-login
CLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
[2026-03-16 02:18:03] [--------] [info ] [main.go:426] CLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
Opening browser for Codex authentication
Attempting to open URL in browser: https://auth.openai.com/oauth/authorize?client_id=app_EMoamEEZ73f0CkXaXp7hrann&code_challenge=LM958ZnLv6Ifiy68kiNaEcET3Pu54B9aEas-o5Ydp6M&code_challenge_method=S256&codex_cli_simplified_flow=true&id_token_add_organizations=true&prompt=login&redirect_uri=http%3A%2F%2Flocalhost%3A1455%2Fauth%2Fcallback&response_type=code&scope=openid+email+profile+offline_access&state=b67faddbe6dc4c127fbe6c8ece79c2b2
Waiting for Codex authentication callback...
Paste the Codex callback URL (or press Enter to keep waiting): [2026-03-16 02:19:19] [--------] [error] [openai_login.go:58] Authentication failed. Please try again.
[2026-03-16 02:19:19] [--------] [error] [openai_login.go:60] Codex authentication detail [code_exchange_failed]: token exchange failed with status 403: {"errCLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
[2026-03-16 02:21:07] [--------] [info ] [main.go:426] CLIProxyAPI Version: dev, Commit: none, BuiltAt: unknown
Codex device authentication failed: codex device code request failed with status 403: {"error":{"code":"unsupported_country_region_territory","message":"Country, region, or territory not supported","param":null,"type":"request_forbidden"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions