Fix Minimax Portal OAuth 401 Error
[minimax-portal] OAuth 401 Unauthorized
Error: minimax-portal authentication failed
Token exchange response: {"error": "invalid_token"}This issue was introduced in OpenClaw 2026.2.26. If you updated from an earlier version and are using minimax-portal, you need to regenerate your API key.
OpenClaw 2026.2.26 updated the Minimax Portal OAuth integration. Tokens generated under the old format are rejected with a 401 Unauthorized error. The fix is to regenerate your Minimax Portal API key and update your OpenClaw credentials.
Next Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Jump to Fix
Step 1: Regenerate Your Minimax Portal API Key
Go to minimax.io and log into your account.
Navigate to Dashboard โ API Keys (or Settings โ API).
Find your existing API key and click "Revoke" or "Delete".
Click "Create New API Key" and save the new key securely โ it will only be shown once.
Step 2: Update Credentials in openclaw.json
{
"credentials": {
"minimax-portal": {
"apiKey": "YOUR_NEW_MINIMAX_API_KEY",
"groupId": "YOUR_GROUP_ID"
}
}
}After updating the config, restart the gateway to apply the new credentials:
openclaw gateway restart
Alternative: Use Direct Minimax API Instead of Portal
If you continue to have Portal OAuth issues, you can switch to the direct Minimax API which uses a simpler API key in the Authorization header:
{
"model": "minimax/MiniMax-Text-01",
"credentials": {
"minimax": {
"apiKey": "YOUR_MINIMAX_API_KEY"
}
}
}The direct Minimax API and minimax-portal may have different model names and endpoints. Check the Minimax API docs to confirm which models are available on each provider.
Verify Authentication
# Check gateway logs after restart openclaw gateway logs | grep -i minimax # Run diagnostics npx clawkit-doctor@latest
You should see [minimax-portal] Authenticated successfully in the gateway logs (or no auth errors). Try sending a test message to confirm end-to-end functionality.
Other authentication issues
Fix It Faster With Our Tools
Did this guide solve your problem?