Reputation: 1022
When I access the YouTube API via oAuth, I pull through my requests as normal. However, when I attempt to pull GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY}
from the api, it is a partial response. The 'Try It' section of the api explorer suggests that I sould have something like this:
{
"kind": "youtube#channelListResponse",
"etag": "\"CuSCwMPVmgi8taDtE2LV6HdgkN0/fPSUUr0h7J55AKwqUPO1XTzosJo\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"CuSCwMPVmgi8taDtE2LV6HdgkN0/SKfAkvqva5DXzL8H0X-h8n5TACg\"",
"id": "UCn1kMRRSG8-QdRWcaK7BgIw",
"contentDetails": {
"relatedPlaylists": {
"likes": "LLn1kMRRSG8-QdRWcaK7BgIw",
"favorites": "FLn1kMRRSG8-QdRWcaK7BgIw",
"uploads": "UUn1kMRRSG8-QdRWcaK7BgIw",
"watchHistory": "HLn1kMRRSG8-QdRWcaK7BgIw",
"watchLater": "WLn1kMRRSG8-QdRWcaK7BgIw"
},
"googlePlusUserId": "101052779404071735515"
}
}
]
}
However, I usually only get this:
{
"kind": "youtube#channelListResponse",
"etag": "\"CuSCwMPVmgi8taDtE2LV6HdgkN0/fPSUUr0h7J55AKwqUPO1XTzosJo\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"CuSCwMPVmgi8taDtE2LV6HdgkN0/SKfAkvqva5DXzL8H0X-h8n5TACg\"",
"id": "UCn1kMRRSG8-QdRWcaK7BgIw",
}
]
}
Upvotes: 0
Views: 233
Reputation: 8112
Your HTTP sample request GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY}
is usually used to retrieve channel information. This request uses the channels.list
method to retrieve details about the channels belonging to the authenticated user as discussed in Retrieve Channel Information.
Furthermore, the documentation states that:
The response to this request includes the channel ID and contentDetails for the authenticated user's channel. The contentDetails include the several system-generated playlists associated with the channel. Many of the subsequent requests require either the channel ID or one of the playlist IDs, so it's important to record them.
The response that you got cannot be considered as partial response because Submitting a request for a partial feed response states that:
To request a partial API response, add the
fields
parameter to the URL that you would use to retrieve the full API response,
Upvotes: 1