I am using PHP API (https://github.com/vimeo/vimeo.php) to update the vimeo video information, but I am getting the following error: The requested video could not be found
.
The code I used:
$video_response = $lib->request('/videos/$video_id', array('name' => ' TESTING'), 'PATCH');
Some insights:
Authenticate this call as {MY USERNAME}
option checked, it worked.I believe in PHP, single quotes will not parse the variable.
So the following:
$video_id = 12345;
$video_response = $lib->request('/videos/$video_id', array('name' => ' TESTING'), 'PATCH');
Will make an HTTP POST request to https://api.vimeo.com/videos/$video_id
You need to switch to double quotes, or string concatenation.
$video_id = 12345;
$video_response = $lib->request('/videos/' . $video_id, array('name' => ' TESTING'), 'PATCH');
// OR
$video_response = $lib->request("/videos/$video_id", array('name' => ' TESTING'), 'PATCH');
Either of the above will make a Will make an HTTP POST request to https://api.vimeo.com/videos/12345