---
title: "Long-poll WeChat QR-code scan for a workspace"
method: POST
path: "/api/workspaces/{id}/im/weixin/qr-wait"
tags: ["IM Channels"]
---

# Long-poll WeChat QR-code scan for a workspace

`POST /api/workspaces/{id}/im/weixin/qr-wait`

Polls for QR scan progress. Returns status "wait", "scaned", "confirmed", "expired", or other terminal states. On "confirmed", bot_id is set. On "expired", qrcode_url contains a refreshed code.

## Path parameters

- `id` string, required

## Response `200`

OK

- IMWeixinQRWaitResponse
  - `bot_id` string, nullable
  - `connected` boolean, required
  - `message` string, nullable
  - `qrcode_url` string, nullable
  - `status` string, required
  - `user_id` string, nullable

## Other responses

- `400` — no active session
- `403` — not a member
- `502` — upstream error

---

[API](https://skmtc.net/agentserver/apis/agentserver-api.md) · [All operations](https://skmtc.net/agentserver/apis/agentserver-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentserver/agentserver-api/versions/e8c329825b4e/schema)
