qwen-portal-auth-helper
> Battle-tested solution for qwen-portal OAuth automation
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
Qwen Portal Auth Helper
Battle-tested solution for qwen-portal OAuth automation
Solves the "interactive TTY required" problem, prevents cron task failures, and provides full monitoring.
🚨 The Problem
qwen-portal provides free models (2,000 requests/day) but OAuth expires every 1-2 weeks. When it expires:
- Cron tasks fail with:
Qwen OAuth refresh token expired or invalid openclaw models auth login --provider qwen-portalfails:requires an interactive TTY- Manual intervention required, breaking automation
- Tasks remain in error state even after authentication fix
💡 The Solution
This skill provides a complete solution:
- Automated OAuth link extraction using tmux (bypasses TTY requirement)
- Health monitoring for qwen-portal tasks
- Self-healing scripts to fix task states
- Documented best practices from real-world experience
🚀 Quick Start
Installation
# Install from ClawHub
clawhub install qwen-portal-auth-helper
# Or clone manually
cd ~/.openclaw/skills/
git clone https://github.com/jazzqi/qwen-portal-auth-helper.git
Get OAuth Link (when authentication expired)
cd ~/.openclaw/skills/qwen-portal-auth-helper
./scripts/get-qwen-oauth-link.sh
Output:
🔗 OAuth Link: https://chat.qwen.ai/authorize?user_code=M17WU0SC
📱 Device Code: M17WU0SC
Check Authentication Health
./scripts/check-qwen-auth.sh
Setup Weekly Monitoring
# Add to crontab (runs every Monday at 9 AM)
0 9 * * 1 ~/.openclaw/skills/qwen-portal-auth-helper/scripts/check-qwen-auth.sh
🔧 Features
1. OAuth Link Automation
# Traditional way (fails in automation):
openclaw models auth login --provider qwen-portal # ❌ Error: requires interactive TTY
# Our solution:
./scripts/get-qwen-oauth-link.sh # ✅ Works in cron, AI assistants, etc.
How it works: Uses tmux to create virtual terminal, captures output before command hangs.
2. Health Monitoring
- Scans all cron tasks using qwen-portal models
- Detects error states and consecutive failures
- Generates detailed reports with actionable advice
- Early warning before complete failure
3. Recovery Tools
- Resets task error states after authentication fix
- Provides step-by-step recovery checklist
- Validates fixes actually work
📋 Complete Workflow
When tasks start failing:
1. Run: check-qwen-auth.sh
→ Identifies failing tasks, shows error details
2. Run: get-qwen-oauth-link.sh
→ Provides OAuth link and device code
3. User: Click link, authenticate in browser
→ Authorization completes automatically
4. Test: openclaw cron run <task-id>
→ Verifies authentication works
5. Reset: Scripts help reset task state
→ Tasks return to normal operation
📊 Based on Real Experience
This skill was developed from solving actual production issues on 2026-03-09:
- Two critical news collection tasks failing
- 9-10 consecutive errors before detection
- Multiple failed attempts before finding tmux solution
- Complete documentation in
.learnings/system
🏗️ Project Structure
qwen-portal-auth-helper/
├── SKILL.md # Complete documentation
├── README.md # This file
├── package.json # Package information
├── index.js # Node.js API
├── _meta.json # Skill metadata
├── .clawhub/config.json # ClawHub configuration
├── scripts/ # Core automation scripts
│ ├── get-qwen-oauth-link.sh
│ ├── check-qwen-auth.sh
│ └── reset-task-state.py
├── examples/ # Usage examples
│ └── quick-recovery.md
├── docs/ # Detailed documentation
└── PUBLISH_GUIDE.md # Publishing instructions
🔗 Links
- ClawHub: https://clawhub.com/skills/qwen-portal-auth-helper
- GitHub: https://github.com/jazzqi/qwen-portal-auth-helper
- Documentation: SKILL.md
- Quick Recovery: examples/quick-recovery.md
🤝 Contributing
Found a better way? Have another OAuth provider with similar issues?
- Fork the repository
- Add your improvements
- Submit pull request
- Help others avoid the same pitfalls
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Based on real-world experience from 2026-03-09
- OpenClaw community for the platform
- All users who contributed feedback and testing
Remember: qwen-portal OAuth expires every 1-2 weeks.
Solution: Weekly monitoring + this skill = no more surprises.
Skill version: 1.0.0 | Based on 2026-03-09 battle-tested experience