Trouble with vimeo API in private mode

3.4k Views Asked by At

I have a pro account, and use the private mode. I m trying to use the vimeo API to access information of my video, that is embedded on my website. Unfortunately, it doesn't word. I m getting this error message :

Warning: file_get_contents(http://vimeo.com/api/v2/video/111657767.php) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in

$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$vimeo_id.php"));

Thanks a lot for your help.

Regards

anabia

2

There are 2 best solutions below

0
On

The URL you are using is the old Simple API. The Simple API has never supported private videos, and as a PRO user in private mode, all of your videos are private.

Take a look at our new API to reference private videos: https://developer.vimeo.com/api

We even offer a PHP library to handle all of the heavy lifting: https://github.com/vimeo/vimeo.php

0
On

a solution (found here) based on oembed that worked for me:

$data = @file_get_contents('http://vimeo.com/api/oembed.json?url=http://vimeo.com/' . $video_id);

I hope this helps somebody!