Read Contact information using C#

Hello Experts,
I need to read contact information using C#. I am new in Infusion is there any sample code for same? Step by step guide which help me to understand how to connect Infusion customer database and read.
FYI- Customer has read application but suddenly it stopped working and not able to understand what is going on.
Please help me !
Thanks
Sandip

1 Like

You can find sample code here:

https://developer.infusionsoft.com/resources/code-examples/

Here is sample C# code that connects to the API.

Hope that helps.

1 Like

Hi Sandip
I have exactly the same question as you - I need to write a simple C# app that will read contact information from an infusionsoft account using the API.
All examples I can find are broken or too old.

How did you get on, did you get it working? Can you share any code?

Many thanks
Steve

You don’t have to use the EventDay C# SDK if you don’t want to (or it doesn’t work). You can use any XML/RPC client (like http://xml-rpc.net/) to use the XML/RPC API. If you are wanting to hit the REST API then you only really need a rest client like http://restsharp.org/. You just have to handle the token management on your own.

Thanks thats good to know. Most of the infusionsoft documentation on using the API seems to encourage REST and implies the old API will be phased out soon. But there’s been no update for a couple of years

Not sure what you are referring to when you say no update for a couple years. If you are referring to the EventDay SDK, then that is true. It is not an Infusionsoft product. It is an open source SDK EventDay created on their own. The only officially supported SDK is our PHP one at this time, which handles both XML/RPC and REST APIs.

We are encouraging people to use REST over the XML/RPC when they can. We currently do not have feature parity with REST vs XML/RPC so it we still support it. We are just not adding to XML/RPC anymore. All new dev is focused on REST.

I’m referring to the example .Net code here:
https://developer.infusionsoft.com/resources/code-examples/

There doesn’t seem to be any up to date examples written by Infusionsoft.

Also the developer blog hasn’t been updated for 2 years:
https://developer.infusionsoft.com/blog/

A post from 2014 says:
“The long-term plan is that the only authentication option for Infusionsoft apps and integrations will be OAuth 2.0.”
This is important info when deciding which API approach to use, yet there has been no update.

I’d love to just get going with a simple C# API project but am finding the lack of resources and up to date info worrying

We have work planned on automatic SDK generation (for a number of languages) and sample projects that use them, but don’t have results for public consumption yet. Hopefully soon!

The blog has not been updated in sometime. Curious how you found, because I thought we removed all links to it (maybe the googles :slight_smile: ). The sample C# code will work except the API key you need to use is an OAuth 2.0 Access Token instead of the legacy key. The legacy api still works, but we are trying to get rid of it. You should definitely be building based on OAuth 2.0. The XML/RPC calls we be sticking around until we have most of the same functionalityin the REST API. We have been urging people to use REST unless there is something they can’t do in REST that can be done in XML/RPC. When that is the case let us so to help prioritize what we work on next. The docs under Keap REST API and xml-rpc - Keap Developer Portal are up to date. If something is not working as documented please let us know and we will fix it.

I am having the same issue as Sandip. I can not find a C# approach to Authenticating and viewing contact information. I am trying to write a console application that will verify the contact info. I will be Authenticating and passing the Infusionsoft ID with a GET and reviewing the populated contact JSON model that is returned. Is there a C# syntax example and not just a high level discussions?

Thanks,

Bill

They would have to use HttpWebRequest to the endpoint to get the authorization token…and then use the same method to use the auth token to get the access/refresh token pair.