Created
April 11, 2013 06:40
-
-
Save mir4a/5361235 to your computer and use it in GitHub Desktop.
gettin access to hipchat api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$token = "ADMIN_TOKEN"; // replace with your admin token | |
$url = "https://api.hipchat.com/v1/users/list?auth_token=".$token; // this url gets all users and their attributes, for more info visit https://www.hipchat.com/docs/api/ | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); // required this for https access | |
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2); // this one too | |
curl_setopt($c, CURLOPT_URL, $url); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); | |
echo curl_exec($c); // return json data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment