> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get channel QR session

> Poll a Channel QR authorization session.

`GET /api/v1/forward/qr_sessions/{session_key}`

Returns the current status of a QR authorization session.

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Path parameters

| Parameter     | Type   | Required | Description                                                  |
| ------------- | ------ | -------- | ------------------------------------------------------------ |
| `session_key` | string | Yes      | Opaque QR session key returned by Create Channel QR Session. |

## Example request

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/qr_sessions/qr-a1b2c3d4' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "session_key": "qr-a1b2c3d4",
  "channel_id": "channel_dingtalk-001",
  "channel_type": "dingtalk",
  "status": "confirmed",
  "expires_at": "2026-06-18T10:05:00Z",
  "err_code": null,
  "err_msg": null
}
```

## Status values

| Status      | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| `waiting`   | Waiting for scan, authorization, installation, or configuration. |
| `scanned`   | QR code was scanned and is waiting for mobile confirmation.      |
| `confirmed` | Activation succeeded. Channel `binding_status` becomes `bound`.  |
| `expired`   | QR session expired. Create a new QR session.                     |
| `denied`    | User denied authorization or cancelled installation.             |
| `error`     | The third-party channel returned an unrecoverable error.         |

## Error codes

| HTTP | Type                   | Trigger                                                                 |
| ---- | ---------------------- | ----------------------------------------------------------------------- |
| 401  | `authentication_error` | PAT is invalid or expired.                                              |
| 404  | `not_found_error`      | QR session does not exist, is expired, or is not visible to the caller. |

## Response fields

| Field          | Type         | Description                                                         |
| -------------- | ------------ | ------------------------------------------------------------------- |
| `session_key`  | string       | Opaque QR session key.                                              |
| `status`       | string       | `waiting`, `scanned`, `confirmed`, `expired`, `denied`, or `error`. |
| `channel_id`   | string       | Associated Channel ID.                                              |
| `channel_type` | string       | Associated channel type.                                            |
| `expires_at`   | string       | QR session expiration time.                                         |
| `err_code`     | string\|null | Channel error code on failure.                                      |
| `err_msg`      | string\|null | Channel error message on failure.                                   |

## Notes

* `session_key` is a short-lived opaque credential.
* After `confirmed`, refresh Channel details.

## Related

<CardGroup cols={2}>
  <Card title="Create channel QR session" icon="qrcode" href="/cloud-agents/api/forward/channels/create-qr-session" />

  <Card title="Get a channel" icon="file-lines" href="/cloud-agents/api/forward/channels/get" />
</CardGroup>
