Timetrex Cloud Hosted Community Edition JSON API

Discussion for TimeTrex open source community developers.
Post Reply
blake
Posts: 12
Joined: Fri Apr 29, 2016 5:06 pm

Timetrex Cloud Hosted Community Edition JSON API

Post by blake » Fri Apr 29, 2016 5:09 pm

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?

shaunw
Posts: 7360
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex Cloud Hosted Community Edition JSON API

Post by shaunw » Sun May 01, 2016 12:10 pm

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.

Post Reply