| Name | Type | Description |
|---|---|---|
store_path | Path | None | Default: NoneWhere to persist the token. Defaults to
|
client_id | str | Default: CHATGPT_CLIENT_IDOAuth client ID (defaults to Codex/ChatGPT client). |
host | str | Default: DEFAULT_REDIRECT_HOSTLocal callback host. Must be a loopback address. |
port | int | Default: DEFAULT_REDIRECT_PORT |
callback_path | str | Default: DEFAULT_REDIRECT_PATH |
scope | str | Default: DEFAULT_SCOPE |
open_browser | bool | Default: True |
timeout | float | Default: 300.0 |
Run the ChatGPT OAuth 2.0 Authorization Code Flow with PKCE.
Starts a loopback callback server, optionally opens a browser to the
OpenAI authorize endpoint (when open_browser=True; the URL is always
printed as a fallback), exchanges the returned code for tokens, and
persists them via _FileChatGPTOAuthTokenProvider.
See Also:
login_chatgpt_device: Headless fallback for environments without a
browser or the ability to bind a localhost callback port.
Local callback port.
Local callback path.
OAuth scope string.
Whether to launch the system browser.
Seconds to wait for the callback.