2

I am new to FreshBooks (not only the API) and I want to use it for some automatically generated invoices. I was trying to run some of the source code examples (the PHP and JS libraries in particular): http://developers.freshbooks.com/api/samplecode/

The problem is that I get an error message: "Connection error"

Do I need to set up anything else in the example files besides my API and token obtained from the FreshBooks site?

I am running the examples from a local server but I don't believe that's the problem.

Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
User3419
  • 1,716
  • 2
  • 14
  • 16

1 Answers1

2

I'm going to post Mr. Sewani's answer here, because I believe it can be useful to other people as well:

Sorry that you are having trouble with that library. I just tried myself and I get the same error from the Javascript+PHP library. I have checked that the servers are working properly, so I am quite convinced it is a bug in the library. Sorry that we led you astray there. I'll take a closer look and re-evaluate which libraries we list in the docs.

If you are comfortable switching languages, I would particularly recommend the Python or Ruby ones I mentioned before, as we have a number of people using those successfully.

Hopefully, the PHP and/or JS libraries will be fixed soon so the API can be used with these programming languages.

Randy Levy
  • 22,566
  • 4
  • 68
  • 94
User3419
  • 1,716
  • 2
  • 14
  • 16
  • 1
    So the problem is an existing defect. It would be great if you could update the answer if you hear back that it is fixed or there is some other work around. – Randy Levy Jun 26 '10 at 18:33