Page 1 of 1

Timetrex Cloud Hosted Community Edition JSON API

Posted: Fri Apr 29, 2016 5:09 pm
by blake
When I use the JSON API on the community edition I can log in fine but other queries I get this response.

Code: Select all

array(2) {
  ["api_retval"]=>
  bool(false)
  ["api_details"]=>
  array(5) {
    ["code"]=>
    string(9) "EXCEPTION"
    ["description"]=>
    string(32) "Invalid referrer, possible CSRF."
    ["record_details"]=>
    array(3) {
      ["total"]=>
      int(0)
      ["valid"]=>
      int(0)
      ["invalid"]=>
      int(0)
    }
    ["user_generic_status_batch_id"]=>
    bool(false)
    ["details"]=>
    bool(false)
  }
}
Do you allow use of the API in the hosted version of the community edition?

Re: Timetrex Cloud Hosted Community Edition JSON API

Posted: Sun May 01, 2016 12:10 pm
by shaunw
Yes, API access it supported, however you will need either use the API client example from the downloadable version of TimeTrex, or make sure you send the REFERER header with each request that matches the JSON URL.