2

I want to build a member directory which enables visitors to search the member information (basically just the addresses and contact) I store in the InfusionSoft CRM. Can I use the InfusionSoft API to fetch data from the CRM and post the retrieved data to my website? I am new to php and web development. Any help are appreciated! Thank you!

Huiying Li
  • 21
  • 2
  • Yes, you can indeed use the InfusionSoft API for this. When I've worked with InfusionSoft and PHP I've found [this](https://github.com/novaksolutions/infusionsoft-php-sdk) library to be more useful than the one InfusionSoft themselves provide. – Ryan Kozak Aug 03 '17 at 05:36
  • Is OAuth problem involved? I want to make this search function public which means visitors don't need to log in to search. Could u provide more details on how to start? – Huiying Li Aug 03 '17 at 05:56
  • If you use a PHP script on your server to run the queries through the InfusionSoft API, your server will be the only one that requires an API key. You can allow users to run specific queries through requests sent to your own PHP scripts without authentication. I'll try and provide some code examples as an answer if I've got the time. – Ryan Kozak Aug 03 '17 at 06:22
  • Thanks in advance! – Huiying Li Aug 03 '17 at 06:31

1 Answers1

0

Follow the Installation Directions for Novak Solutions SDK found here. There are lots of good code samples on here too though you want to checkout.

Mainly these two things are important.

Copy the Infusionsoft directory to your project.

Copy the config.sample.php file to config.php and put in your Infusionsoft app hostname and api key.

    <?php


require_once('Infusionsoft/infusionsoft.php');


$contacts = Infusionsoft_DataService::query(new Infusionsoft_Contact(), array('Email' => 'POSTREQUEST HERE'));

foreach($contacts as $contact) {
    // Return these
}
Ryan Kozak
  • 1,091
  • 6
  • 16
  • 21
  • I tried to run the sample codes provided by the sdk on easyPHP, but it didn't work. I already put the whole SDK repository under the working project and change the host name and api key. easyPHP return something like 'Fatal error: Uncaught No CURL support compiled in. Attempted: 1 time(s). thrown in D:\MemberDirectory\infusionsoft-php-sdk\Infusionsoft\App.php on line 192' – Huiying Li Aug 03 '17 at 06:55
  • That error would mean that you need to install cURL on your system. I'm not a windows user but [this thread](https://stackoverflow.com/questions/181082/how-do-i-install-curl-on-windows) may help you get that part solved. – Ryan Kozak Aug 06 '17 at 17:09
  • another question, how can I fetch the company field information by company name? – Huiying Li Aug 07 '17 at 00:49