AI-generated Key Takeaways
-
The
membersendpoint has replaced the deprecatedsponsorsendpoint as of March 31, 2020, with thesponsorsendpoint ceasing support after September 30, 2020, requiring API clients to update their calls. -
A
memberresource represents a YouTube channel member who provides recurring monetary support to a creator and receives exclusive benefits, such as access to members-only chat. -
The API's
members.listmethod allows channel owners to retrieve a list of their channel members, and it is available exclusively to individual creators for their own, channel-memberships-enabled YouTube channels. -
The
memberresource provides details in its snippet section, including the member's profile data, the creator channel ID, the membership's highest accessible level, and the overall duration of the membership, along with the duration at specific membership levels.
members endpoint replaces the
sponsors endpoint, which is now deprecated and will no longer be supported on or
after September 30, 2020. API clients should update calls to the sponsors.list
method to use the members.list method instead.
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.
A member resource represents a channel member for a YouTube
channel. A member provides recurring monetary support to a creator and receives special
benefits. For example, members are able to chat when the creator turns on members-only mode for
a chat.
Methods
The API supports the following methods for member resources:
- list
- Lists members (formerly known as "sponsors") for a channel. The API request must be authorized by the channel owner.
Resource representation
The following JSON structure shows the format of a member resource:
{
"kind": "youtube#member",
"etag": etag,
"snippet": {
"creatorChannelId": string,
"memberDetails": {
"channelId": string,
"channelUrl": string,
"displayName": string,
"profileImageUrl": string
},
"membershipsDetails": {
"highestAccessibleLevel": string,
"highestAccessibleLevelDisplayName": string,
"accessibleLevels": [
string
],
"membershipsDuration": {
"memberSince": datetime,
"memberTotalDurationMonths": integer,
},
"membershipsDurationAtLevel": [
{
"level": string,
"memberSince": datetime,
"memberTotalDurationMonths": integer,
}
]
}
}
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
kind |
stringIdentifies the API resource's type. The value will be youtube#member. |
etag |
etagThe Etag of this resource. |
snippet |
objectThe snippet object contains details about the member. |
snippet.creatorChannelId |
stringThe YouTube channel ID of the creator that offers memberships. |
snippet.memberDetails |
objectThis object contains profile data about the YouTube channel that is paying for the membership. Note that a channel can have members with unavailable profile data. For example, this occurs with members who have deleted their channels but are still paying for memberships. Note that these members can still access their membership benefits. API responses include resources for those members to ensure accurate counts even though the profile details inside the memberDetails object are not set. The
membershipsDetails are
still provided for such members. |
snippet.memberDetails.channelId |
stringThe YouTube channel ID of the member channel. If it is set, the channel ID can also be treated as a unique identifier for the member. If it is not set, the member cannot be uniquely identified, but the resource still conveys membership details such as the levels that the member can access and the duration of their membership. |
snippet.memberDetails.channelUrl |
stringThe channel's URL. |
snippet.memberDetails.displayName |
stringThe channel's display name. |
snippet.memberDetails.profileImageUrl |
stringThe channel's avatar URL. |
snippet.membershipsDetails |
objectThis object contains membership details for the member channel. |
snippet.membershipsDetails.highestAccessibleLevel |
stringThe ID of the highest membership level that the member channel can currently access. The value corresponds to the id property
value in a membershipsLevel resource. |
snippet.membershipsDetails.highestAccessibleLevelDisplayName |
stringThe name of the highest membership level that the member channel can currently access. The value corresponds to the displayName
property value in a membershipsLevel resource. |
snippet.membershipsDetails.accessibleLevels[] |
list (of strings)A list of IDs for all membership levels that the user can currently access. The list includes the currently active level and all levels below it. |
snippet.membershipsDuration |
objectThis object contains information about the overall duration of the current member's membership without regard to pricing levels. The snippet.membershipsDetails.membershipsDurationAtLevel[]
property then contains a list of objects that contain details about a period of the membership
during which the member had access to a particular membership level.
The following example shows how these properties work: A member purchases a new membership in January at membership level 1 and has that membership until March. In April and May, the member does not have a membership. In June, the member restarts their membership, again at level 1. Then, in August, the member upgrades their membership to level 2. So, if an API call is made in October, the member resource would contain the following:
"membershipsDetails": {
"membershipsDuration": {
"memberSince": "2020-06-01T12:00:00",
"memberTotalDurationMonths": 7,
},
"membershipsDurationAtLevel": [
{
"level": "level_1_ID",
"memberSince": "2020-06-01T12:00:00",
"memberTotalDurationMonths": 7
},
{
"level": "level_2_ID",
"memberSince": "2020-08-01T12:00:00",
"memberTotalDurationMonths": 2
},
]
} |
snippet.membershipsDuration.memberSince |
datetimeThe date and time that the member's current membership started. In other words, the member has continuously had a membership since this date and time. Note that different periods of the membership might have been spent at different membership levels. |
snippet.membershipsDuration.memberTotalDurationMonths |
integerThe number of months, rounded down to the nearest integer, that the user has been a member. The value reflects the number of complete months that the member has had a membership, but the number does not imply that the member has continuously had a membership for that many months. |
snippet.memberDetails.membershipsDetails.membershipsDurationAtLevel[] |
list (of objects)A list of objects, in which each object contains details about a period of the membership during which the member had access to a particular membership level. The list includes one object for each membership level that the member can currently access. |
snippet.memberDetails.membershipsDetails.membershipsDurationAtLevel.level |
stringThe membership level ID. The value corresponds to the id property value in a
membershipsLevel resource. |
snippet.memberDetails.membershipsDetails.membershipsDurationAtLevel.memberSince |
datetimeThe date and time from which the member has had access to the specified membership level. In other words, the member has continuously had access to the level since this date and time. Note that different periods of the membership might have been spent at higher membership levels. |
snippet.memberDetails.membershipsDetails.membershipsDurationAtLevel.memberTotalDurationMonths |
integerThe number of months, rounded down to the nearest integer, that the user has had access to the specified level. The value reflects the number of complete months that the member has had access to the level, but the number does not imply that the member has continuously had a membership for that many months. |