我們正在更新 Data API,以符合 YouTube 計算 Shorts 觀看次數的方式。
瞭解詳情
MembershipsLevels
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
注意:只有個別創作者才能使用這個端點,為自己的 YouTube 頻道 (已啟用頻道會員功能) 提出要求。請與 Google 或 YouTube 代表聯絡,申請存取權。
membershipsLevel
資源會指出由授權 API 要求的創作者管理的價格等級。
方法
這個 API 支援 membershipsLevel
資源的下列方法:
- list
- 列出授權要求的頻道會員等級。
屬性
下表定義了這個資源中顯示的屬性:
屬性 |
kind |
string
識別 API 資源的類型。值為 youtube#membershipsLevel 。 |
etag |
etag
這項資源的 Etag。 |
id |
string
YouTube 指派的 ID,用於唯一識別會員等級。即使等級的顯示名稱有所變更,這個值也不會改變。 |
snippet |
object
snippet 物件包含會員等級的詳細資料。 |
snippet.creatorChannelId |
string
擁有價格等級的創作者 YouTube 頻道 ID。 |
snippet.levelDetails |
object
這個物件包含會員等級的資料。 |
snippet.levelDetails.displayName |
string
等級的顯示名稱。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-21 (世界標準時間)。
[null,null,["上次更新時間:2025-08-21 (世界標準時間)。"],[],["The `membershipsLevel` resource identifies pricing levels for a channel's memberships. Creators can use the `list` method to retrieve these levels via the API. Each level includes a unique `id`, `etag`, `kind`, and a `snippet` object. The `snippet` details the `creatorChannelId` and `levelDetails`. `levelDetails` contains the `displayName` for that specific membership level. The API access is restricted to individual creators of channel-membership enabled YouTube channels.\n"],null,["# MembershipsLevels\n\nNote: This endpoint can only be used by individual creators to make requests for their own, channel-memberships-enabled YouTube channel. Reach out to your Google or YouTube representative to request access.\n\nA **membershipsLevel** resource identifies a pricing level managed\nby the creator that authorized the API request.\n\nMethods\n-------\n\nThe API supports the following methods for `membershipsLevel` resources:\n\n[list](/youtube/v3/docs/membershipsLevels/list)\n: Lists membership levels for the channel that authorized the request.\n\nResource representation\n-----------------------\n\nThe following JSON structure shows the format of a `membershipsLevel` resource: \n\n```text\n{\n \"kind\": \"youtube#membershipsLevel\",\n \"etag\": etag,\n \"id\": string,\n \"snippet\": {\n \"creatorChannelId\": string,\n \"levelDetails\": {\n \"displayName\": string,\n }\n }\n}\n```\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Identifies the API resource's type. The value will be `youtube#membershipsLevel`. |\n| `etag` | `etag` The Etag of this resource. |\n| `id` | `string` The ID that YouTube assigns to uniquely identify the membership level. This value will not change even if the level's display name changes. |\n| `snippet` | `object` The `snippet` object contains details about the membership level. |\n| snippet.`creatorChannelId` | `string` The YouTube channel ID of the creator that owns the pricing level. |\n| snippet.`levelDetails` | `object` This object contains data about the membership level. |\n| snippet.levelDetails.`displayName` | `string` The level's display name. |"]]