When using the YouTube v3 API to request channel branding settings, why are they returned for requests by channel ID, but not for requests by username? The API does not return branding settings for channel list queries by username.
If you request channel branding settings by channel ID (for example, id=UC8-Th83bH_thdKZDJCrn88g ), you will id=UC8-Th83bH_thdKZDJCrn88g full set of branding parameters:
Google API Explorer: https://developers.google.com/youtube/v3/docs/channels/list
Request
GET https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&id=UC8-Th83bH_thdKZDJCrn88g&key={YOUR_API_KEY}
answer
{ // ... snip ... "items": [ { "kind": "youtube#channel", "etag": "\"...\"", "id": "UC8-Th83bH_thdKZDJCrn88g", "brandingSettings": { "channel": { "title": "The Tonight Show Starring Jimmy Fallon", "description": "Watch The Tonight Show Starring Jimmy Fallon Weeknights 11:35/10:35c\n\nThe Tonight Show Starring Jimmy Fallon features hilarious highlights from the show including: comedy sketches, music parodies, celebrity interviews, ridiculous games, and, of course, Jimmy Thank You Notes and hashtags! You'll also find behind the scenes videos and other great web exclusives.", // all the branding settings are here } } }] }
If, on the other hand, you send a channel list request for the username (for example, forUsername=latenight ), you get no branding settings at all . Branding settings are not returned or filled out.
Request
GET https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&forUsername=latenight&key={YOUR_API_KEY}
answer
{ // ... snip ... "items": [ { "kind": "youtube#channel", "etag": "\"...\"", "id": "UC8-Th83bH_thdKZDJCrn88g" }] }