我的 Youtube Api v3 有问题。问题是想要从上传的视频中获取信息,在执行检索视频信息时,出现错误 403 Forbidden。
如果我运行我正在使用的 url,浏览器会返回包含所有视频数据的 Json。
Visual Studio 错误
浏览器中的相同 URL。
if (videoId != "")
{
// If the video has the same description as a video and uploaded to YouTube, then I have removed that was uploaded earlier and upload the newrequest.Service.QueryClientLoginToken();
//Uri urlVideo = new Uri(String.Format("http://gdata.youtube.com/feeds/api/users/{0}/uploads/{1}", hipoConfig.canal_youtube, videoId)); This is This is the URL of the version 2.0
Uri urlVideo = new Uri(String.Format("https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&part=snippet", videoId, hipoConfig.clave_api));
Video ExistingVideo = request.Retrieve<Video>(urlVideo);
log.escribirInfoLog("Informacion: El video " + ExistingVideo.VideoId + "se elimina de YouTube para ser sustituido");
request.Delete(ExistingVideo);
也不适合我,访问 youtube API 时收到 403 错误。
in the 'API Restrictions' on the APIs credentials page added it to restrict to the YouTube ABI, now it's working fine.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)