0

I had used active collab API . as per their document generated API URL and API token .

when i try to retrieve data from activeCollab a 404 error is shown in console. i don't know whats wrong with mine. this is my URL: http://my_site.com/api.php?path_info=people&auth_api_token=my_api_token. this is my code that I've done also,

require_once 'ActiveCollab/autoload.php';
use \ActiveCollab\Client as API;
use \ActiveCollab\Connectors\Curl as CurlConnector;
API::setUrl('my_api_url');
API::setKey('my_api_token');
API::setConnector(new CurlConnector);
var_dump(API::info());
Tomasz Kowalczyk
  • 10,472
  • 6
  • 52
  • 68
Jahir CU
  • 111
  • 2
  • 13

1 Answers1

0

HTTP 404 means not found, so I think that you got the wrong API URL. If token was incorrect, you would get 404 (Forbidden).

A couple of things to check:

  1. Make sure that you are using stable version of ActiveCollab SDK. If you are including ActiveCollab SDK using composer, require it using "activecollab/activecollab-sdk": "~1.0", not dev-master,
  2. Go to your user profile in your ActiveCollab installation, select API Subscriptions from Options drop-down and than click on a magnifier glass icon next to a subscription that you want to use (or create a new subscription, and than click the icon). System will list two bits that you need to make requests - correct URL and correct token. Copy and paste these values.
Ilija
  • 4,105
  • 4
  • 32
  • 46
  • I sure that the all thing u mentioned above was correct in my side.Also i got 'YES' when run these URL in browser : http://test.ac.pm.mysite.com/api.php?check_if_alive=1. – Jahir CU Dec 18 '14 at 03:45
  • If that is the case, please send a bit of code that you are using with exact connection parameters, and our tech support will take a look. – Ilija Dec 18 '14 at 06:50