{"record":{"id":"963ec03e439fa620","repo":"HKUDS/nanobot","slug":"feishu-lark-registration-did-not-return-a-login","errorCode":null,"errorMessage":"Feishu / Lark registration did not return a login URL","messagePattern":"Feishu / Lark registration did not return a login URL","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/feishu/runtime.py","lineNumber":548,"sourceCode":"            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\", \"\")\n    if not isinstance(qr_url, str) or not qr_url:\n        raise RuntimeError(\"Feishu / Lark registration did not return a login URL\")\n    interval = res.get(\"interval\")\n    expire_in = res.get(\"expire_in\")\n    return {\n        \"device_code\": device_code,\n        \"qr_url\": qr_url,\n        \"interval\": interval if isinstance(interval, int) else 5,\n        \"expire_in\": expire_in if isinstance(expire_in, int) else 600,\n    }\n\n\ndef _poll_registration(\n    *,\n    device_code: str,\n    interval: int,\n    expire_in: int,\n    domain: str = \"feishu\",\n) -> dict[str, Any] | None:\n    \"\"\"Poll until the user scans the QR code, or timeout/denial.","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/feishu/runtime.py#L530-L566","documentation":"Error \"Feishu / Lark registration did not return a login URL\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/channels/feishu/runtime.py:548 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"}