Vine oEmbed Internal Server Error



I am trying to pull the JSON data for a Vine via the oEmbed API endpoint created for them. The request works fine in the browser and on my local Vagrant machine, but as soon as I run it on the server, it throws a 500 Internal Server Error.

$url = '';
$res = file_get_contents($url);
$json = json_decode($res);

I have already tried using a cURL request and passing in stream_create_context() with headers into the file_get_contents() call.

My example cURL request returning HTML formatted 500 Internal Server Error

$url = '';
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);

My ultimate goal is to get the thumbnail for the video and I am performing similar requests to Vimeo and Instagram without getting an Internal Server Error.

It is as if my Rackspace server has been blocked from making requests to their API, but this is the first time I have ever attempted to make requests to Vine.


Throws a 500 error on your server or Vines? I was getting similar errors until I changed json_decode($res) to json_decode($res, true)


Hi ,

I am using curl to get embed code.

When I execute in my local setup working fine.

When I execute on my servers it returns 500 error. I am able make other twitter api calls .

Pasting code here:

$ch = curl_init();
$url = ‘’;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$output = curl_exec($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($output, 0, $header_size);
$body = substr($output, $header_size);

Thanking you in advance.



I am running this from the command line on my server and the response being returned is a 500 error. There is no response to run through json_decode().


This is similar to an issue Twitter was having in Fall 2014. Vine API seems to be blocking RackSpace IP block from accessing Content. Vine / Twitter, can you let us know if there is a way to resolve this. Please feel free to reply to me directly. I am a System Administrator that works with the Original Poster.