lark_oauth_complete
Complete OAuth authorization for Lark by polling until user grants access or timeout occurs, then store access token and return user ID.
Instructions
【OAuth】轮询 Device Flow 的 token 端点,直到用户在浏览器完成授权或超时。成功后自动持久化 user_access_token 并返回 open_id。device_code 来自 lark_oauth_start 的返回值。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_code": "<device_code>"
},
"name": "lark_oauth_complete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_code | Yes | ||
| poll_timeout_sec | No | Max seconds to block waiting for the user to authorize. If still pending at timeout, returns status=pending — call again to keep polling. Max 90 (MCP call timeout). |