I am trying to connect to my Insightly account via API given on this link: https://github.com/Insightly/insightly-php
When I test the given code:
<?php
require('insightly.php');
function run_tests($apikey){
$insightly = new Insightly($apikey);
$insightly->test();
}
run_tests($argv[1]);
?>
Nothing actually happens, meaning it gives out a blank page. Of course I have changed the variable $apikey
with the key given. I have tried with base64 encoding, single quotes, double quotes, but nothing really works. I have also tried on localhost as well as on my server.
Then I tried the code given on Github:
require("insightly.php");
$i = new Insightly('your-api-key');
$contacts = $i->getContacts();
Again, changing the api key with the one given, once normal and once in base64 encoding. This just gives me a 500 error.
Does anybody have any idea how to even connect to Insightly via API in PHP?