Skip to content

OpenAI Authorization 403 Error #7900

Closed
Closed

Description

@syw2014

Description

After install opencode , I had auth OpenAI plus,erros bellow:

Waiting for authorization..Error: Unexpected error, check log file at /Users/jerryshi/.local/share/opencode/log/2026-01-12T024753.log for more details

error: Token exchange failed: 403
at exchangeCodeForTokens (src/plugin/codex.ts:121:15)
at processTicksAndRejections (native:7:39)

Plugins

No response

OpenCode version

1.1.13

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Macos 26.2 (25C56)

Terminal

No response

Activity

  1. github-actions commented on Jan 12, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. zizhen01 commented on Jan 12, 2026

    @zizhen01

    Same issue here

    `◑ Waiting for authorization..Error: Unexpected error, check log file at /Users/xx/.local/share/opencode/log/2026-01-12T025639.log for more details

    error: Token exchange failed: 403
    at exchangeCodeForTokens (src/plugin/codex.ts:121:15)
    at processTicksAndRejections (native:7:39)

    ■ Canceled`

  3. syw2014 commented on Jan 12, 2026

    @syw2014
    Author

    Same issue here

    `◑ Waiting for authorization..Error: Unexpected error, check log file at /Users/xx/.local/share/opencode/log/2026-01-12T025639.log for more details

    error: Token exchange failed: 403 at exchangeCodeForTokens (src/plugin/codex.ts:121:15) at processTicksAndRejections (native:7:39)

    ■ Canceled`
    I retried the authentication and found the root cause.
    The issue was related to the VPN routing. With split-tunneling enabled, the browser authorization succeeded, but the CLI token exchange failed with 403.
    After switching the VPN to global mode with enhanced/TUN mode enabled, the OAuth flow completed successfully.

  4. zerogog commented on Jan 13, 2026

    @zerogog

    403 means forbidden. If you not use proxy, use it. If you used proxy, switch it. Same for codex cli.

  5. shiboyu1999 commented on Jan 19, 2026

    @shiboyu1999

    Same issue here
    ◑ Waiting for authorization..Error: Unexpected error, check log file at /Users/xx/.local/share/opencode/log/2026-01-12T025639.log for more details error: Token exchange failed: 403 at exchangeCodeForTokens (src/plugin/codex.ts:121:15) at processTicksAndRejections (native:7:39) ■ Canceled
    I retried the authentication and found the root cause.
    The issue was related to the VPN routing. With split-tunneling enabled, the browser authorization succeeded, but the CLI token exchange failed with 403.
    After switching the VPN to global mode with enhanced/TUN mode enabled, the OAuth flow completed successfully.

    My hero!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions