Any working PHP Library with the new API?

API Discussion
I'm looking for a php library that works with the new changes to the API. Anyone know one?
There's two different examples in this thread:

Good luck.
I recommend using a Library like and both found in GitHub instead of implementing your own script using curl, for security reasons.

And example on how to query the wow api with both Library would be like this:

You can read the documentations of both Libraries on how to configure the headers and query for better performance and caching.

function auth_token()
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials");
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "Content-Type: application/x-www-form-urlencoded";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
//echo 'Error:' . curl_error($ch);
return false;
$data = json_decode($result, true);
return $data["access_token"];


Join the Conversation

Return to Forum