openclaw - 💡(How to fix) Fix openclaw models auth login --provider openai-codex 获取的 token 缺少 api.responses.write scope,gpt-5.4 调用失败 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62235Fetched 2026-04-08 03:07:21
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants
RAW_BUFFERClick to expand / collapse

Bug 描述

`openclaw models auth login --provider openai-codex` 获取的 OAuth token 缺少 `api.responses.write` scope,导致所有 gpt-5.4 调用返回:

``` Missing scopes: api.responses.write. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you'using a restricted API key, that it has the necessary scopes. ```

复现步骤

  1. `openclaw models auth login --provider openai-codex`
  2. 完成 OAuth 授权(使用 Business/Plus 订阅账户)
  3. 获取到的 token 写入 `auth-profiles.json`
  4. 调用 `POST /v1/responses` 时返回上述错误

环境

  • OpenClaw 版本:`2026.4.2`
  • 订阅:ChatGPT Plus + Business
  • OAuth app client_id:`app_EMoamEEZ73f0CkXaXp7hrann`
  • 模型:openai-codex/gpt-5.4

附加信息

  • 之前(2026-04-02)同一套配置可以正常使用 gpt-5.4
  • Token JWT payload 中显示 `chatgpt_plan_type: "team"`,但 scope 列表中确实缺少 `api.responses.write`
  • 可能是 OpenClaw 更新后 OAuth app 注册信息变更导致的
  • API endpoint: POST https://api.openai.com/v1/responses
  • Status code: 401

extent analysis

TL;DR

The most likely fix is to update the OAuth app registration to include the api.responses.write scope.

Guidance

  • Verify that the OAuth app registration includes the necessary scopes, specifically api.responses.write, to ensure the token has the required permissions.
  • Check the OpenClaw documentation for any updates or changes to the OAuth app registration process that may have caused the issue.
  • Consider re-registering the OAuth app or updating the existing registration to include the missing scope.
  • Review the token JWT payload to confirm that the chatgpt_plan_type is correctly set to "team" and that the scope list is updated to include api.responses.write.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue may be specific to the OpenClaw version 2026.4.2 and the ChatGPT Plus + Business subscription. The fix may not apply to other versions or subscriptions.

Recommendation

Apply workaround: Update the OAuth app registration to include the api.responses.write scope, as this is the most likely cause of the issue and updating the registration should resolve the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING