Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

YouTube Data API: video update error: the request metadata is invalid

I get an error when adding title and description translation to some videos.

Methods I've Tried

I tested for invalid characters in the title and description I translated and found that there were no errors. I sent This is a test video and This is a description for test purposes and it still gave an error. Although I do not make any changes in the codes, it does not translate in some videos, but in others do.

The error:

Google.Apis.Requests.RequestError
The request metadata is invalid.[400]
Location[body-other]
Reason[invalidVideoMetadata]
Domain[youtube.video]]

My code:

 VideoLocalization localization = new VideoLocalization();
 localization.Title = "This is a test video";//Title
 localization.Description = "This is a test description";//DESCRIPTION
 video.Localizations.Add("en", localization);//INSERT LANGUAGE

 var my_update_request = youtubeService.Videos.Update(video, "localizations, snippet, status");
 await my_update_request.ExecuteAsync();
question from:https://stackoverflow.com/questions/65936332/youtube-data-api-video-update-error-the-request-metadata-is-invalid

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...