Hello Manuel, thanks for the class, you're making me look good!!! :-)
I'm trying to access desk.com API using your oAuth class and having some problems.
Here is Desk.com oAuth explanation:
dev.desk.com/docs/api/oauth
Here is the code I used:
$client = new OAuth_client_class;
$client->debug = true;
$client->oauth_version = "1.0";
$client->client_id = 'XXXXXXXXX';
$client->client_secret = 'XXXXXXXXXXXXXXXXXXX';
$client->access_token = 'XXXXXXXXXXXXX';
$client->access_token_secret = 'XXXXXXXXXXXXXXXXXXXXXX';
$client->access_token_url = "https://colwiz.desk.com/oauth/access_token";
$client->request_token_url = "https://colwiz.desk.com/oauth/request_token";
$client->dialog_url = "https://colwiz.desk.com/oauth/authorize";
//$client->
$url = 'https://colwiz.desk.com/api/v1/topics.json?page=3';
$method = 'GET';
$parameters = array();
$options = array();
if( ($success = $client->Initialize()) ){
echo "Initialized!<br/>";
$success = $client->CallAPI($url, $method, $parameters, $options, $response);
if ($client->access_token_error!="") {
echo "<br>".$client->access_token_error."<br>";
}
}else{
echo "Problems in Initialization!<br/>";
}
Please take a look if I'm doing it the right way.
Thanks in advance for your help!
Regards,
Bane Zaklan