Open-source AI assistant platform
OpenClaw lets you interact with AI through various messaging channels. You can configure it to access AI models from QwenCloud. It supports three access methods: pay-as-you-go, Token Plan (Personal Edition), and Token Plan Team Edition.
Use this method if the Qwen plugin cannot be installed or you prefer to manage the configuration manually.
The output should include the In the Channels section, DingTalk should be
If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:
Quick Start
1
Install the Qwen plugin
If the plugin cannot be installed, see Configure with a configuration file.
2
Get an API key
- Token Plan
- Pay-as-you-go
Get a Token Plan API key for your edition:
- Token Plan (Personal Edition): Create or view API Key
- Token Plan (Team Edition): Assign a seat and get the API Key
3
Configure the model
Run the command for your billing plan and enter the API key when prompted.
- Token Plan
- Pay-as-you-go
4
Verify
Run the following commands to check the model list and a test call:
Configure with a configuration file
Use this method if the Qwen plugin cannot be installed or you prefer to manage the configuration manually.
1
Open or create the configuration file
~/.openclaw/openclaw.jsonUpdate only the relevant fields in models, agents, and gateway. Do not replace the entire file.2
Write the configuration
- Token Plan (Personal Edition)
- Token Plan (Team Edition)
- Pay-as-you-go
Replace
YOUR_API_KEY with your Token Plan (Personal Edition) dedicated API key. For available models, see supported Token Plan (Personal Edition) models.| Parameter | Value |
|---|---|
| API Key | Token Plan (Personal Edition) dedicated API Key |
| Base URL | https://token-plan.maas.qwencloudapi.com/apps/anthropic |
| Available models | All models included in the Token Plan (Personal Edition) |
gateway.auth.mode: none is suitable only for local single-machine use. To share or access remotely, run openclaw doctor --generate-gateway-token to generate a token, then restart the Gateway.Connect messaging channels
- DingTalk
- Lark
- WeChat
- QQ
If you deploy OpenClaw using Simple Application Server or Elastic Desktop Service, the DingTalk plugin is typically pre-installed and can be configured in the graphical user interface.
1
Create a DingTalk application and get credentials
- Log in to the DingTalk Open Platform, select an organization for which you have developer permissions, or create an organization and then obtain developer permissions.
- In the top menu bar, select Application Development, click Create Application, enter an application name and description, and then click Save.
- On the Add Application Capabilities page, add a Bot. Enable Bot Configuration, fill in the required fields, keep the default Stream mode for message receiving mode, and click Publish.
- On the Credentials and Basic Information page, get the Client ID and Client Secret.
- On the Version Management and Release page, create a version, set the visibility range, save, and publish.
2
Install the DingTalk channel plugin
dingtalk plugin with a status of loaded.3
Configure the DingTalk channel
Add the following configurations to Setting both
~/.openclaw/openclaw.json. Replace YOUR_DINGTALK_APPKEY and YOUR_DINGTALK_APPSECRET with the credentials from Step 1. Do not overwrite existing configurations such as models and agents.dmPolicy and groupPolicy to open is suitable for testing or personal use. In a production environment, set them to allowlist and add the allowFrom field:4
Verify
ON with a status of OK - configured. Send a message to the bot in a DingTalk group chat to test the connection.Error codes
If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:
- Token Plan: Personal Edition FAQ · Team Edition FAQ
- Pay-as-you-go: Error codes
FAQ
How can I view my configured models?
How can I view my configured models?
Enter
openclaw tui in the terminal to start the OpenClaw terminal command line, and then enter /model to view the model list. Press Enter to select a model and Esc to exit the list.Why do I get the errors HTTP 401: Incorrect API key provided., No API key found for provider xxx, or HTTP 401: invalid_iam_token?
Why do I get the errors HTTP 401: Incorrect API key provided., No API key found for provider xxx, or HTTP 401: invalid_iam_token?
Possible causes:
- The API key is invalid, expired, empty, incorrectly formatted, or for the wrong endpoint. Ensure the API key matches your payment method, is copied completely without extra spaces, and that your subscription is active.
- OpenClaw is using an incorrect, stale configuration from its configuration cache. Delete the
providersconfiguration item from~/.openclaw/agents/main/agent/models.jsonand restart OpenClaw. invalid_iam_tokenindicates that the API key failed IAM authentication. Common scenarios include: the API key has been revoked or disabled; the API key's region does not match the Base URL region (for example, the API key was created in Singapore, but the Base URL points to another region); or an STS temporary credential has expired. Verify that the API key and Base URL belong to the same region and that the API key status is active.
I have already configured other channels such as DingTalk. How can I safely add models for a new plan?
I have already configured other channels such as DingTalk. How can I safely add models for a new plan?
- Do not use a replace-all function. It overwrites custom configurations. Modify only the relevant sections.
- If OpenClaw is responding normally, enter the commands directly in an OpenClaw chat to merge the configuration.
- If OpenClaw has no models configured or is not responding, manually edit
~/.openclaw/openclaw.json. Modify only the relevant fields and leave the existing configuration unchanged.
What should I do if I get a device identity required error?
What should I do if I get a device identity required error?
Error message:Cause:A client connected to the gateway without providing a device identity. Common causes include:If the issue persists, clear the abnormal device records and try again:Run
- You are accessing the URL in a browser for the first time, and device pairing is not complete.
- The browser cache was cleared, causing the device key to be lost.
- After reinstalling or upgrading OpenClaw, the key file in the
~/.openclaw/identity/directory is missing.
openclaw devices list to confirm the device appears in the Paired list.Token consumption occurs even when OpenClaw is not actively in use
Token consumption occurs even when OpenClaw is not actively in use
Cause: OpenClaw has a built-in heartbeat mechanism. While the gateway is running, it automatically calls the configured model at a fixed interval (every 30 minutes by default) to check for pending tasks. Each heartbeat consumes a small number of tokens.How to verify: Check the session log files (.jsonl) in
~/.openclaw/agents/main/sessions/. Heartbeat calls are marked with [OpenClaw heartbeat poll].Solutions:- Stop the gateway: run
openclaw gateway stopwhen not in use. This stops the heartbeat immediately. - Increase the heartbeat interval: set
agents.defaults.heartbeat.everyin~/.openclaw/openclaw.json. For example,"2h"sets the interval to every 2 hours.