{"record":{"id":"000a4ad6f497e6bb","repo":"HKUDS/nanobot","slug":"feishu-lark-registration-does-not-support-client","errorCode":null,"errorMessage":"Feishu / Lark registration does not support client_secret auth. Supported: {methods}","messagePattern":"Feishu / Lark registration does not support client_secret auth\\. Supported: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/feishu/runtime.py","lineNumber":528,"sourceCode":"        data=body,\n        timeout=_ONBOARD_REQUEST_TIMEOUT_S,\n        headers={\"Content-Type\": \"application/x-www-form-urlencoded\"},\n    )\n    try:\n        parsed = resp.json()\n        return _as_json_object(parsed) or {}\n    except json.JSONDecodeError:\n        resp.raise_for_status()\n        return {}\n\n\ndef _init_registration(domain: str = \"feishu\") -> None:\n    \"\"\"Verify the environment supports client_secret auth. Raises RuntimeError if not.\"\"\"\n    base_url = _accounts_base_url(domain)\n    res = _post_registration(base_url, {\"action\": \"init\"})\n    methods = _as_json_list(res.get(\"supported_auth_methods\")) or []\n    if \"client_secret\" not in methods:\n        raise RuntimeError(\n            f\"Feishu / Lark registration does not support client_secret auth. \"\n            f\"Supported: {methods}\"\n        )\n\n\ndef _begin_registration(domain: str = \"feishu\") -> _RegistrationStart:\n    \"\"\"Start the device-code flow. Returns device_code, qr_url, interval, expire_in.\"\"\"\n    base_url = _accounts_base_url(domain)\n    res = _post_registration(base_url, {\n        \"action\": \"begin\",\n        \"archetype\": \"PersonalAgent\",\n        \"auth_method\": \"client_secret\",\n        \"request_user_info\": \"open_id\",\n    })\n    device_code = res.get(\"device_code\")\n    if not isinstance(device_code, str) or not device_code:\n        raise RuntimeError(\"Feishu / Lark registration did not return a device_code\")\n    qr_url = res.get(\"verification_uri_complete\", \"\")","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/feishu/runtime.py#L510-L546","documentation":"Error \"Feishu / Lark registration does not support client_secret auth. Supported: {methods}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/feishu/runtime.py:528 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}