API link - https://developers.google.com/youtube/v3/docs/channelBanners/insert
I referred the above API link to create banner for my YouTube channel. As specified in the document, I uploaded the binary image data to YouTube using channelBanners.insert endpoint
Request
POST https://www.googleapis.com/upload/youtube/v3/channelBanners/insertResponse
{"kind":"youtube#channelBannerResource","etag":"XNLrbVGUJFqOLlEad5EXo5pry6Y","url":"https://yt3.ggpht.com/HV5PNcUGNnPTFRvkOt3fcKk9joOm1hxhN5OrgP8ei8cZKNnbS894i3gtT5vP204JRBpO4nUbpw"}Then I tried to update the channel banner using the image URL (https://yt3.ggpht.com/HV5PNcUGNnPTFRvkOt3fcKk9joOm1hxhN5OrgP8ei8cZKNnbS894i3gtT5vP204JRBpO4nUbpw) I got in the above API call.
Request
PUT https://youtube.googleapis.com/youtube/v3/channels?part=brandingSettingsRequest body
{"id": "UCnO4od0EVfOtKpJvATez3dA","brandingSettings": {"image": {"bannerExternalUrl": "https://yt3.ggpht.com/HV5PNcUGNnPTFRvkOt3fcKk9joOm1hxhN5OrgP8ei8cZKNnbS894i3gtT5vP204JRBpO4nUbpw" } }}Error Response
{"error": {"code": 400,"message": "Required","errors": [ {"message": "Required","domain": "global","reason": "required" } ] }}Getting 400 error response when I try to update the channel banner by setting brandingSettings.image.bannerExternalUrl property in the request body. Kindly provide a solution to this issue.
Thanks,Rajalakshmi