Using GoogleAPI v3 url using this url: https://www.googleapis.com/youtube/v3/videos?part=snippet&id=D-wxnID2q4A&key={MyKey}
I get this json:
{
"kind": "youtube#videoListResponse",
"etag": "\"dhbhlDw5j8dK10GxeV_UG6RSReM/uzqDS1yLcX0DglL60bHeS56kZ7c\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#video",
"etag": "\"dhbhlDw5j8dK10GxeV_UG6RSReM/l7OMkGqgmC10NvbO5PzI_nonZzA\"",
"id": "D-wxnID2q4A",
"snippet": {
"publishedAt": "2014-01-08T05:34:04.000Z",
"channelId": "UCtA7mzeypl_udtFySMXTusQ",
"title": "Can You Walk on Water? (Non-Newtonian Fluid Pool)",
"description": "Running, jumping and biking on 8,000 litres of non-newtonian fluid in Kuala Lumpur, Malaysia! Brought to you by Mach by Hong Leong Bank together with We are KIX. Music and info below..\n\nGet Banking with Mach by Hong Leong Bank: http://www.machbyhongleongbank.com\n\nA film and event concept by: http://www.wearekix.com\n\nFeatured Runner: https://www.caykuijpers.com\n\nMUSIC by Thrill me now & Ion Ray: https://soundcloud.com/thrillmenow/walk-on-water-canyouwalkonwater-soundtrack\n\nHosted at: The Square Publika \nDance Crew: http://www.facebook.com/KatoonNetworkDanceCrew\nLive DJ and Sound Effects by: http://www.facebook.com/weare2db\nLive DJ's: http://www.facebook.com/deersociety",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/D-wxnID2q4A/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/D-wxnID2q4A/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/D-wxnID2q4A/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/D-wxnID2q4A/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/D-wxnID2q4A/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Mach by Hong Leong Bank",
"categoryId": "24",
"liveBroadcastContent": "none",
"localized": {
"title": "Can You Walk on Water? (Non-Newtonian Fluid Pool)",
"description": "Running, jumping and biking on 8,000 litres of non-newtonian fluid in Kuala Lumpur, Malaysia! Brought to you by Mach by Hong Leong Bank together with We are KIX. Music and info below..\n\nGet Banking with Mach by Hong Leong Bank: http://www.machbyhongleongbank.com\n\nA film and event concept by: http://www.wearekix.com\n\nFeatured Runner: https://www.caykuijpers.com\n\nMUSIC by Thrill me now & Ion Ray: https://soundcloud.com/thrillmenow/walk-on-water-canyouwalkonwater-soundtrack\n\nHosted at: The Square Publika \nDance Crew: http://www.facebook.com/KatoonNetworkDanceCrew\nLive DJ and Sound Effects by: http://www.facebook.com/weare2db\nLive DJ's: http://www.facebook.com/deersociety"
}
}
}
]
}
I am using C# (Nuget) GoogleAPI for YouTube, I have given API permission and received my key for v3.
My C# code is:
var VideoID = "D-wxnID2q4A";
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = APT.core.Properties.Settings.Default.GoogleKey,
ApplicationName = this.GetType().ToString()
});
var t= youtubeService.Videos.List("part=snippet,id="+VideoID);
This throws the exception :
Exception:Thrown: "Google.Apis.Requests.RequestError
No filter selected. [400]
Errors [
Message[No filter selected.] Location[ - parameter] Reason[missingRequiredParameter] Domain[youtube.parameter]
]
What am I doing wrong ?
Something like this should work:
listResponse
should then contain the information you require.