I'm trying to access appannie.com's api. I can't seem to get past the authentication. Here's what I have, any thoughts?
<?php
$whmusername = "username";
$whmpassword = "password";
$query = "https://api.appannie.com/v1/accounts";
$ch = curl_init();
// Sets the URL cURL will open
curl_setopt($ch, CURLOPT_URL, $query);
// Here's the HTTP auth
// The 3rd argument is your Twitter username and password joined with a colon
curl_setopt($ch, CURLOPT_USERPWD, $whmusername.":".$whmpassword);
// Makes curl_exec() return server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// And here's the result XML
$response = curl_exec($ch);
curl_close($ch);
print $response;
?>
Here's a link to their api docs: http://appannie.zendesk.com/categories/20082753-Analytics-API http://support.appannie.com/entries/23215057-2-Authentication