Add api.responses.write scope to OpenAI OAuth flow

The browser login flow only requested identity scopes, so the resulting
access token lacked permission to call the Responses API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-10 18:07:33 -04:00
parent 8c5d8b8d06
commit 04ae811aff

View file

@ -77,7 +77,10 @@ pub fn build_authorize_url(
("response_type", "code"),
("client_id", client_id),
("redirect_uri", redirect_uri),
("scope", "openid profile email offline_access"),
(
"scope",
"openid profile email offline_access api.responses.write",
),
("code_challenge", &pkce.challenge),
("code_challenge_method", "S256"),
("state", state),