Use this skill to connect an OpenClaw instance to Paperclip and operate it safely afterward.
GET <base-url>/api/health.test-resolution endpoint.adapterType: "openclaw_gateway" and agentDefaultsPayload.headers["x-openclaw-token"].pairing required, approve the pending device pairing in OpenClaw and retry.Do not skip the reachability test. Do not assume a private Docker, LAN, or 172.x address is reachable from Paperclip.
Prefer these checks first:
bash
curl -fsS https://paperclip.example.com/api/health
openclaw status
openclaw qr --json
openclaw devices list
Interpretation:
openclaw qr --json returns the best advertised gateway URL and the urlSource that produced it.ws://127.0.0.1:18789 is not usable from a remote Paperclip deployment.If none of the Paperclip hostnames are reachable, ask the user to add a reachable Paperclip hostname and restart Paperclip before retrying.
Send a JSON body shaped like this:
json
{
"requestType": "agent",
"agentName": "OpenClaw",
"adapterType": "openclaw_gateway",
"capabilities": "OpenClaw gateway agent",
"agentDefaultsPayload": {
"url": "wss://your-openclaw-gateway.example",
"paperclipApiUrl": "https://your-paperclip.example.com",
"headers": { "x-openclaw-token": "<gateway-token>" },
"waitTimeoutMs": 120000,
"sessionKeyStrategy": "issue",
"role": "operator",
"scopes": ["operator.admin"]
}
}
Rules:
~/.openclaw/openclaw.json -> gateway.auth.token.x-openclaw-token rather than legacy x-openclaw-auth unless compatibility forces otherwise.paperclipApiUrl.Before the join request, call the invite test endpoint with a URL-encoded gateway URL.
bash
python3 - <<'PY'
import urllib.parse
print(urllib.parse.quote('wss://your-openclaw-gateway.example', safe=''))
PY
Then:
bash
curl -fsS "https://paperclip.example.com/api/invites/INVITE_ID/test-resolution?url=<encoded-url>"
Treat an unreachable result as a real warning. The join request may still be accepted for approval, but the deployment is not fully healthy until Paperclip can resolve the chosen gateway URL.
After the join request succeeds:
request id, claimSecret, and claimApiKeyPath.~/.openclaw/workspace/paperclip-claimed-api-key.json.chmod 600 ~/.openclaw/workspace/paperclip-claimed-api-key.json.PAPERCLIP_API_KEY and PAPERCLIP_API_URL from that file for future runs.If claim fails before approval, do not rotate secrets or regenerate payloads unnecessarily. Wait for approval and retry once.
First confirm identity and permissions:
bash
curl -sS "$PAPERCLIP_API_URL/api/agents/me" \
-H "Authorization: Bearer $PAPERCLIP_API_KEY"
Only proceed with agent creation if the response permits it.
When creating Paperclip agents:
engineer, designer, qa, researcher, pm, or general.Symptom:
json
{"error":"Invite not found or inactive"}
Action: request a fresh invite.
Symptom:
json
{"error":"Join request must be approved before key claim"}
Action: wait for Paperclip board approval, then retry the claim once.
Action:
bash
openclaw devices list
openclaw devices approve --latest
Then retry the gateway action that failed.
Common causes:
wss://... when Paperclip reachability probe expects HTTPS on the same hostnameAction: choose a hostname Paperclip can actually resolve, verify GET /api/health, then rerun the invite test-resolution check.
Use only valid Paperclip roles accepted by the target deployment. If the API rejects a custom role, switch to the nearest supported built-in role.
When the onboarding or repair work is done, report these exact points: