How to delete a video using the youtube API v3 and PHP
NickName:KB. Ask DateTime:2014-11-07T00:01:05

How to delete a video using the youtube API v3 and PHP

Just wondering how I would delete a video from YouTube using v3 of the API using the official Google PHP library.

I see this here:

Deleting a video from a playlist with YouTube Data API v3

$youtubeService = new Google_YouTubeService($client);
$playlistItems = $youtubeService->playlistItems;
$deleteVid = $playlistItems->delete($videocode);

Not sure if this is correct - does this work if the video is not in a playlist?

I also have the code for v2 of the API

Deleting YouTube videos using Zend/PHP

$videoEntryToDelete = $yt->getVideoEntry($videoId, null, true);
$yt->delete($videoEntryToDelete);

But rather use v3

Copyright Notice:Content Author:「KB.」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/26783848/how-to-delete-a-video-using-the-youtube-api-v3-and-php

More about “How to delete a video using the youtube API v3 and PHP” related questions

How to delete a video using the youtube API v3 and PHP

Just wondering how I would delete a video from YouTube using v3 of the API using the official Google PHP library. I see this here: Deleting a video from a playlist with YouTube Data API v3 $

Show Detail

Delete video with YouTube API v3

error_reporting(E_ALL); ini_set("display_errors", 1); require_once 'google-api-php-client/src/Google/autoload.php'; require_once 'google-api-php-client/src/Google/Client.php'; require_once 'google-...

Show Detail

Upload video to Youtube using Youtube API V3 and PHP

I am trying to upload a video to Youtube using PHP. I am using Youtube API v3 and I am using the latest checked out source code of Google API PHP Client library. I am using the sample code given on...

Show Detail

How to add Youtube Video annotation using Youtube API V3

I am trying to add a Youtube video with annotation using Youtube api v3 in php. I have been unable to find any information in the documentation as to how to create annotations though the API. Doe...

Show Detail

How to Like Youtube Video with Youtube Api v3 using php

Since Youtube Api V2 doesn't support like a specific video anymore. Can anyone please explain how to like a video with youtube api v3 ? I am always getting the following response: Response 400 Bad

Show Detail

Play youtube video using youtube api v3 in php

I am using YouTube Data API(v3) for accessing data of youtube. I search a lot how can I play a video in PHP using this API, but I couldn't find anything. I know there is a way to play YouTube vide...

Show Detail

Fetch video details on Youtube using API v3 in PHP

How can I fetch video details from Youtube via API v3 in PHP? I need help in getting started with this. I tried this tutorial already but it's not working. http://www.w3resource.com/API/youtube/tut...

Show Detail

How to upload Video to YouTube using Google API PHP Client Library and Youtube API V3?

Trying to simply upload video using Google API PHP Client (latest release 1.1.6), but code in Youtube API V3 is not working and giving 500 internal server error. What is wrong with code below when...

Show Detail

How to fetch share count of youtube video using YouTube Analytics API v3?

I m trying to fetch share count of youtube video using YouTube Analytics API v3. I am using google php client library to upload videos. I am able to find count of likes, dislikes, etc using this ur...

Show Detail

How to add Captions to Youtube video using Youtube API v3?

I used the Youtube API v3 example to successfully upload a video. I can't find how to programmatically add subtitles to the video. https://developers.google.com/youtube/v3/code_samples/dotnet#

Show Detail