0
votes

I have trouble with the videos.insert method when I set the description.

$snippet = new Google_Service_YouTube_VideoSnippet();
$snippet->setTitle(strip_tags($webinar['subject']));
// Prepare description
$description = preg_replace('/ {2,}/',' ',$webinar['description']);
// $description = strip_tags($description);
$snippet->setDescription($description);

Return Error:

A service error occurred: Error calling PUT https://www.googleapis.com/upload/youtube/v3/videos?part=status%2Csnippet&uploadType=resumable&upload_id=AEnB2UpePMcweB9uaZoO_Vm8sH8DnVuDb1pU-rgZYfnTmYPMJlLLaDN7oLDz184UKtcX4j5eecDzHtxT1XJws2v-p9aeJTDkq874DZOXSEaLYKqyUfhqUds: (400) Failed to parse Content-Range header.

I got this description from the DB with an html-like tag

1

1 Answers

0
votes

Problam in path to video file. It was wrong, so it make some problem in header.