{"skill":{"slug":"codebox-qrcode","displayName":"CodeBox QR Code","summary":"Generate, manage, and track QR codes via CodeBox API. Create dynamic QR codes with 200+ style templates, track scans with analytics (device, location, time),...","description":"---\nname: codebox-qrcode\ndescription: Generate, manage, and track QR codes via CodeBox API. Create dynamic QR codes with 200+ style templates, track scans with analytics (device, location, time), batch generate up to 20 codes, and manage QR code lifecycle. Supports dynamic (trackable) and static modes.\nversion: 1.0.0\nmetadata:\n  openclaw:\n    requires:\n      env:\n        - CODEBOX_API_KEY\n      bins:\n        - curl\n    primaryEnv: CODEBOX_API_KEY\n    emoji: \"📱\"\n    homepage: https://www.codebox.club\n---\n\n# CodeBox QR Code Skill\n\nGenerate, manage, and track QR codes using the CodeBox API.\n\n## Setup\n\nThe user needs a CodeBox API key. Get one at https://www.codebox.club/zh/dashboard/apikeys\n\nSet the environment variable:\n```\nCODEBOX_API_KEY=cb_sk_xxxxxxxxxxxxxxxx\n```\n\n## API Base URL\n\nAll requests go to `https://www.codebox.club/api/v1/plugin`\n\n## Authentication\n\nEvery request must include:\n```\nAuthorization: Bearer $CODEBOX_API_KEY\n```\n\n## Available Actions\n\n### 1. Generate QR Code\n\n**POST** `https://www.codebox.club/api/v1/plugin/generate`\n\nUse this to create a new QR code. Supports dynamic (trackable, updatable URL) and static modes.\n\n```bash\ncurl -X POST https://www.codebox.club/api/v1/plugin/generate \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"https://example.com\",\n    \"mode\": \"DYNAMIC\",\n    \"name\": \"My QR Code\",\n    \"templateId\": \"classic-black\",\n    \"errorCorrectionLevel\": \"M\"\n  }'\n```\n\n**Parameters:**\n- `content` (required): URL or text to encode\n- `mode`: `DYNAMIC` (default, trackable) or `STATIC` (no tracking, free)\n- `name`: Display name for the QR code\n- `templateId`: Style template ID (use list_templates to browse)\n- `keywords`: Array of keywords for automatic template matching (e.g. `[\"christmas\", \"holiday\"]`)\n- `errorCorrectionLevel`: `L`, `M` (default), `Q`, or `H`\n\n**Response includes:** `id`, `shortUrl`, `qrCodeUrl` (PNG image), `targetUrl`\n\n### 2. Batch Generate\n\n**POST** `https://www.codebox.club/api/v1/plugin/batch-generate`\n\nGenerate up to 20 QR codes in a single request. Each item is processed independently (partial failure supported).\n\n```bash\ncurl -X POST https://www.codebox.club/api/v1/plugin/batch-generate \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"items\": [\n      {\"content\": \"https://example.com/1\", \"name\": \"Link 1\"},\n      {\"content\": \"https://example.com/2\", \"name\": \"Link 2\", \"templateId\": \"ocean-blue\"}\n    ]\n  }'\n```\n\n### 3. List QR Codes\n\n**GET** `https://www.codebox.club/api/v1/plugin/qrcodes`\n\n```bash\ncurl \"https://www.codebox.club/api/v1/plugin/qrcodes?page=1&size=10\" \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\"\n```\n\n**Query params:** `page`, `size` (max 50), `mode` (STATIC/DYNAMIC/AI), `keyword`\n\n### 4. Get Scan Analytics\n\n**POST** `https://www.codebox.club/api/v1/plugin/analytics`\n\n```bash\ncurl -X POST https://www.codebox.club/api/v1/plugin/analytics \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"qrCodeId\": \"xxx\",\n    \"startDate\": \"2026-01-01\",\n    \"endDate\": \"2026-03-23\"\n  }'\n```\n\nReturns: total scans, unique scans, time series, device/browser/OS breakdown, location stats.\n\n### 5. Update Dynamic QR Code\n\n**POST** `https://www.codebox.club/api/v1/plugin/update`\n\nChange the target URL, name, or status of a dynamic QR code.\n\n```bash\ncurl -X POST https://www.codebox.club/api/v1/plugin/update \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"id\": \"xxx\",\n    \"targetUrl\": \"https://new-destination.com\",\n    \"name\": \"Updated Name\"\n  }'\n```\n\n**Parameters:** `id` (required), `targetUrl`, `name`, `status` (READY/EXPIRED/DELETED)\n\n### 6. Delete QR Code\n\n**DELETE** `https://www.codebox.club/api/v1/plugin/qrcodes/{id}`\n\n```bash\ncurl -X DELETE \"https://www.codebox.club/api/v1/plugin/qrcodes/xxx\" \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\"\n```\n\n### 7. Clone QR Code\n\n**POST** `https://www.codebox.club/api/v1/plugin/qrcodes/{id}/clone`\n\n```bash\ncurl -X POST \"https://www.codebox.club/api/v1/plugin/qrcodes/xxx/clone\" \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\"\n```\n\n### 8. Export Scan Events\n\n**GET** `https://www.codebox.club/api/v1/plugin/qrcodes/{id}/scans`\n\n```bash\ncurl \"https://www.codebox.club/api/v1/plugin/qrcodes/xxx/scans?page=1&size=20\" \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\"\n```\n\n**Query params:** `page`, `size` (max 100), `startDate`, `endDate`\n\n### 9. Browse Templates\n\n**GET** `https://www.codebox.club/api/v1/plugin/catalog`\n\n```bash\ncurl \"https://www.codebox.club/api/v1/plugin/catalog?keyword=christmas&limit=10\" \\\n  -H \"Authorization: Bearer $CODEBOX_API_KEY\"\n```\n\n**Query params:** `category`, `keyword`, `limit` (default 20)\n\n## Rules\n\n- Always use `$CODEBOX_API_KEY` from environment, never ask the user for it inline.\n- Default to `DYNAMIC` mode unless the user explicitly asks for static QR codes.\n- When the user describes a style (e.g. \"Christmas themed\", \"blue ocean\"), use the `keywords` parameter in the generate call for automatic template matching, or call the catalog endpoint first to find a matching `templateId`.\n- Dynamic QR codes consume 1 credit per generation. Static QR codes are free.\n- When generating multiple QR codes, prefer batch-generate (max 20) over individual calls.\n- The `qrCodeUrl` in the response is a direct link to the PNG image — you can share this URL directly.\n- The `shortUrl` is the trackable redirect link to share with end users.\n\n## Error Handling\n\n- **403 with code `CREDIT_EXHAUSTED`**: User is out of credits. Tell them to recharge at https://www.codebox.club/zh/dashboard/pricing\n- **401**: Invalid API key. Ask user to check their key at https://www.codebox.club/zh/dashboard/apikeys\n- **400**: Bad request — check required parameters.\n","tags":{"api":"1.0.0","latest":"1.0.0","marketing":"1.0.0","qrcode":"1.0.0"},"stats":{"comments":0,"downloads":747,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":4},"createdAt":1773061286210,"updatedAt":1778491788483},"latestVersion":{"version":"1.0.0","createdAt":1774253070621,"changelog":"Initial release: 9 QR code operations via CodeBox API","license":"MIT-0"},"metadata":{"setup":[{"key":"CODEBOX_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"gdfsdjj145","userId":"s173bnsyyfaxbvrc67s885ydtd884a27","displayName":"gdfsdjj145","image":"https://avatars.githubusercontent.com/u/41331442?v=4"},"moderation":null}