Want to quickly connect your OpenClaw to OpenAI's large language model? This tutorial will guide you step by step through configuring OpenAI Codex via OAuth authorization. The entire process takes only 1 minute!
Before starting the configuration, make sure you meet the following requirements:
| Requirement | Description |
|---|---|
| OpenClaw System | Deployed and running properly (version 2026.4.8 or above recommended) |
| OpenAI Account | A valid ChatGPT account (Free or Plus plan) |
| Network Environment | Able to access the OpenAI official website |
💡 Tip: The OpenAI Codex (OAuth) method does not require manually obtaining an API Key — simply authorize with your ChatGPT account. It's perfect for beginners to get started quickly!

⚠️ Note: The dropdown menu also includes other options such as Bailian, Zhipu AI, Volcengine, Kimi, etc. This tutorial uses OpenAI Codex as an example.
After selecting the model, the system will automatically display a "Waiting for OAuth Authorization" window.
Confirm the model provider is displayed as "OpenAI Codex (OAuth)"

Click the blue link "Click to authorize" — your browser will automatically redirect to the OpenAI website

💡 Tip: Do not close the OpenClaw authorization window at this point — you will need to return to it later to paste the verification link.
After being redirected to the OpenAI website, you will see the "Welcome back" login page.
Choose any of the following login methods:
| Login Method | Instructions |
|---|---|
| Email Login | Enter your registered email and click "Continue" |
| Google Account | Click "Continue with Google" |
| Apple Account | Click "Continue with Apple" |
| Microsoft Account | Click "Continue with Microsoft" |
| Phone Number | Click "Continue with phone" |

After successfully logging in, you will see the "Sign in to Codex with ChatGPT" authorization confirmation page.
Please read the authorization details carefully:
Once confirmed, click the blue "Continue" button on the right to complete the authorization.

After successful authorization, the browser will redirect to a new page. Pay attention to the browser address bar:
scope, state, openid, profile, etc.)
🔥 Important: This callback link is one-time use only. Make sure to copy it completely without missing any characters!
Now return to the OpenClaw authorization waiting window:

Final step:
Click the blue button "I have completed authorization" at the bottom 🎉
The system will automatically verify your authorization information. If everything is correct, the model status will change to "Connected", and you can start using it right away!

After successful configuration, you can verify through the following:
| Verification Item | Expected Result |
|---|---|
| Model Status | Displays "Connected" or a green checkmark ✅ |
| Telegram Test | Send a code-related question and receive a reply |
❓ Q1: What if the page doesn't load after clicking "Go to authorize"?
Check whether your network environment can access the OpenAI official website. If you encounter network issues, try switching networks and retrying.
❓ Q2: What if the pasted link shows a verification failure?
Please ensure:
❓ Q3: Authorization succeeded but the model doesn't work?
Try clicking the "Restart" button in the OpenClaw panel to restart the service, then test again.
❓ Q4: Will OAuth authorization consume my ChatGPT quota?
Yes, Codex uses the rate limits of your ChatGPT account plan. If you are using a free account, there may be call frequency limitations.
❓ Q5: Can I configure multiple models at the same time?
Yes! You can add multiple model providers in the "Models" area. The current setup will automatically use the most recently added one.
🚀 Congratulations on completing the configuration! Go ahead and experience the power of AI-assisted coding! If you have more questions, feel free to check the "Tutorial Collection" or visit the community for discussions.
For more practical tutorials on OpenClaw in the cloud
Such as one-click deployment of OpenClaw, integration with QQ/WeChat/DingTalk/Lark/Discord/Telegram/WhatsApp, installation and use of Skills, please see:Mastering OpenClaw | One-click, second-level deployment guide for OpenClaw (Clawdbot) in the cloud.
A Discord has been created, and everyone is welcome to join and explore advanced ways to use Moltbot (Clawdbot) together!
For more practical tutorials on OpenClaw in the cloud, such as one-click deployment of OpenClaw, integration with QQ/WeChat/DingTalk/Lark/Discord/Telegram/WhatsApp, installation and use of Skills, please see Mastering OpenClaw | One-click, second-level deployment guide for OpenClaw (Clawdbot) in the cloud.
Unlock advanced tips on Discord
Click to join the community
Note: After joining, you can get the latest plugin templates and deployment playbooks
Join WhatsApp / WeCom for dedicated technical support
| Channel | Scan / Click to join |
|---|---|
| WhatsApp Channel |
|
| WeCom (Enterprise WeChat) |
|
Learn more on the official page: Tencent Cloud OpenClaw