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

# 探索已連結的使用者

> 傳回透過有效 OAuth 授權連結到你應用程式的使用者，以及其外部參考 ID 與授權範圍。

傳回透過有效 OAuth 授權連結到你應用程式的使用者，以及每位使用者的 `externalReferenceId` 與授權範圍。用於在呼叫其他批次作業前，確認可觸及的對象與各使用者已授權的內容。

僅傳回識別碼與授權範圍 — **絕不會包含使用者權杖**。

## Requirements

* `Authorization: Basic <API_KEY>`（你的應用程式 API 金鑰）
* 應用程式具備 **bulk API 能力**

## Query

```graphql theme={null}
query GetBulkConnectedOAuthUsers($paginate: BulkPaginationInput) {
  getBulkConnectedOAuthUsers(paginate: $paginate) {
    totalCount
    hasNextPage
    users {
      externalReferenceId
      accountId
      userId
      scopes
      connectedAt
    }
  }
}
```

### Variables

```json theme={null}
{
  "paginate": { "limit": 100, "offset": 0 }
}
```

## Response

```json theme={null}
{
  "data": {
    "getBulkConnectedOAuthUsers": {
      "totalCount": 128,
      "hasNextPage": true,
      "users": [
        {
          "externalReferenceId": "your-user-001",
          "accountId": "8f3c…",
          "userId": "b21a…",
          "scopes": ["LIST_PAYMENT", "LIST_PURCHASES"],
          "connectedAt": "2026-05-01T12:00:00.000Z"
        }
      ]
    }
  }
}
```

## Arguments

| Argument          | Type  | Description              |
| ----------------- | ----- | ------------------------ |
| `paginate.limit`  | `Int` | 每頁使用者數。最大值與預設值為 **100**。 |
| `paginate.offset` | `Int` | 要略過的使用者數。預設為 `0`。        |

## Response fields

| Field                         | Description                                                    |
| ----------------------------- | -------------------------------------------------------------- |
| `users[].externalReferenceId` | 你對該使用者的參考 ID。若於連結時未設定則為 `null` — 這類使用者僅能透過 `ALL_CONNECTED` 觸及。 |
| `users[].accountId`           | 已連結使用者的帳戶 ID。                                                  |
| `users[].userId`              | 已連結使用者的使用者 ID。                                                 |
| `users[].scopes`              | 使用者授予你應用程式的範圍。                                                 |
| `users[].connectedAt`         | 使用者完成連結的時間。                                                    |
| `totalCount`                  | 跨所有頁面的已連結使用者總數。                                                |
| `hasNextPage`                 | 是否在此頁之後仍有更多使用者。                                                |

## Notes

* bulk API 允許的頁面大小比其他 API 更大 — 每頁最多 100 筆。
* 以 `offset` 分頁，直到 `hasNextPage` 為 `false`。
