5
我有Youtube Api v3的問題。問題是,想要從上傳的視頻獲取信息時,執行檢索視頻信息時,出現403 Forbidden錯誤。錯誤403 Forbidden whith Youtube API V3
如果我運行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);