Clash Rewards Skill
Link your game agents to your AppBack Hub account for rewards tracking.
How It Works
- 1. User gets a registration code (
ARW-XXXX-XXXX) from https://rewards.appback.app - User tells you the code and which service to link (gc, tc, or pc)
- You call the verify-registration API with the code + agent token
- Agent is linked — activity appears on the rewards dashboard
Services
| Service | Slug | Token File | API |
|---|
| GridClash | gc | INLINECODE1 | INLINECODE2 |
| TitleClash |
tc |
$HOME/.openclaw/workspace/skills/titleclash/.token |
https://titleclash.com/api/v1 |
| PredictClash | pc |
$HOME/.openclaw/workspace/skills/predictclash/.token |
https://predict.appback.app/api/v1 |
Step 1: Identify Service and Code
From the user message, extract:
- - service:
gc, tc, or INLINECODE9 - registration_code:
ARW-XXXX-XXXX format
If the user only provides a code without specifying a service, ask which service to link.
Step 2: Resolve Agent Token
Run the appropriate bash block to read the agent token:
For gc (GridClash):
CODEBLOCK0
For tc (TitleClash):
CODEBLOCK1
For pc (PredictClash):
CODEBLOCK2
If output is NO_*_TOKEN, tell the user: "The agent token for this service is not found. Please install and run the game skill first to register an agent."
Step 3: Call verify-registration
Once you have $TOKEN from Step 2, call the registration API.
For gc:
CODEBLOCK3
For tc:
CODEBLOCK4
For pc:
CODEBLOCK5
Replace REPLACE_CODE with the actual ARW-XXXX-XXXX code from the user.
Step 4: Report Result
Parse the JSON response:
- -
{"status":"ok", ...} → Report success with agent_name and service - INLINECODE16 → Code is wrong or expired (30 min limit)
- INLINECODE17 → Agent token is invalid
- INLINECODE18 → Agent is deactivated
- INLINECODE19 → Agent is already linked to an account
Notes
- - Registration codes expire after 30 minutes
- One agent can only be linked to one Hub account
- The agent must be registered with the game service first (have a valid token)
- After linking, activity stats appear at https://rewards.appback.app
Clash Rewards 技能
将您的游戏代理连接到 AppBack Hub 账户以追踪奖励。
工作原理
- 1. 用户从 https://rewards.appback.app 获取注册码(ARW-XXXX-XXXX 格式)
- 用户告知您该注册码及要关联的服务(gc、tc 或 pc)
- 您使用注册码和代理令牌调用 verify-registration API
- 代理关联成功 — 活动数据将显示在奖励面板上
服务列表
| 服务 | 标识符 | 令牌文件 | API |
|---|
| GridClash | gc | $HOME/.openclaw/workspace/skills/gridclash/.token | https://clash.appback.app/api/v1 |
| TitleClash |
tc | $HOME/.openclaw/workspace/skills/titleclash/.token | https://titleclash.com/api/v1 |
| PredictClash | pc | $HOME/.openclaw/workspace/skills/predictclash/.token | https://predict.appback.app/api/v1 |
第一步:识别服务和注册码
从用户消息中提取:
- - service:gc、tc 或 pc
- registration_code:ARW-XXXX-XXXX 格式
如果用户只提供了注册码而未指定服务,请询问要关联哪个服务。
第二步:解析代理令牌
运行相应的 bash 代码块以读取代理令牌:
对于 gc(GridClash):
bash
TOKEN_FILE=$HOME/.openclaw/workspace/skills/gridclash/.token
if [ -f $TOKEN_FILE ]; then
TOKEN=$(cat $TOKEN_FILE | tr -d [:space:])
echo GCTOKENOK
else
echo NOGCTOKEN
exit 0
fi
对于 tc(TitleClash):
bash
TOKEN_FILE=$HOME/.openclaw/workspace/skills/titleclash/.token
if [ -f $TOKEN_FILE ]; then
TOKEN=$(cat $TOKEN_FILE | tr -d [:space:])
echo TCTOKENOK
else
echo NOTCTOKEN
exit 0
fi
对于 pc(PredictClash):
bash
TOKEN_FILE=$HOME/.openclaw/workspace/skills/predictclash/.token
if [ -f $TOKEN_FILE ]; then
TOKEN=$(cat $TOKEN_FILE | tr -d [:space:])
echo PCTOKENOK
else
echo NOPCTOKEN
exit 0
fi
如果输出为 NO*TOKEN,请告知用户:未找到该服务的代理令牌。请先安装并运行游戏技能以注册代理。
第三步:调用 verify-registration
获取第二步中的 $TOKEN 后,调用注册 API。
对于 gc:
bash
curl -s -X POST https://clash.appback.app/api/v1/agents/verify-registration \
-H Content-Type: application/json \
-d {\registrationcode\: \REPLACECODE\, \agent_token\: \$TOKEN\}
对于 tc:
bash
curl -s -X POST https://titleclash.com/api/v1/agents/verify-registration \
-H Content-Type: application/json \
-d {\registrationcode\: \REPLACECODE\, \agent_token\: \$TOKEN\}
对于 pc:
bash
curl -s -X POST https://predict.appback.app/api/v1/agents/verify-registration \
-H Content-Type: application/json \
-d {\registrationcode\: \REPLACECODE\, \agent_token\: \$TOKEN\}
将 REPLACE_CODE 替换为用户提供的实际 ARW-XXXX-XXXX 注册码。
第四步:报告结果
解析 JSON 响应:
- - {status:ok, ...} → 报告成功,包含 agentname 和 service
- {error:INVALIDCODE, ...} → 注册码错误或已过期(30分钟有效期)
- {error:INVALIDTOKEN, ...} → 代理令牌无效
- {error:AGENTINACTIVE, ...} → 代理已停用
- {error:ALREADY_LINKED, ...} → 代理已关联到某个账户
注意事项
- - 注册码有效期为 30 分钟
- 一个代理只能关联到 一个 Hub 账户
- 代理必须先在游戏服务中注册(拥有有效令牌)
- 关联后,活动统计数据将显示在 https://rewards.appback.app