Last post May 04, 2019 10:17 AM by Ndfd2008
Feb 16, 2010 05:57 AM|surivin|LINK
I was trying to use zoho api, but i never used any before.
So i was looking for help on how to use any api in C#.
Feb 16, 2010 11:42 PM|qwe123kids|LINK
Read its documets.
Feb 17, 2010 12:09 AM|surivin|LINK
Thanks for replying.
But i had never used an api before so i want to know how to use one.
How to make a webrequest and how to get the response how to pass parameters.
Oct 16, 2010 01:07 PM|jamest85|LINK
This is the demo you can have a look and see if that fits, you can contact to the writer for further info
Using ZOHO CRM API in .Net Website page
May 04, 2019 10:17 AM|Ndfd2008|LINK
Here, zoho has multiple applications like zoho crm, zoho books, zoho creator and many more so every application has their own way to use API. Here, in zoho you need to create new project by using this url
Here, you will get clientId, ClientSecret, RefreshToken and GrantType. Once you get this, you need to update this project as Self Client by creating Token. This token, you need to pass every time when you request zoho API with the help of following code.
string access_token = "";
//get New token via refresh token
string url = "https://accounts.zoho.com/oauth/v2/token";
using (var wb = new WebClient())
var data = new NameValueCollection();
data["refresh_token"] = "1000.6a23d95d46b76e4123c9350f1f0024d0.2d6d1361a5ace62d6dc3cf3608982593";
data["client_id"] = "1000.76QIP6FQYNWL071311ORRYFE6N0J42";
data["client_secret"] = "2e34e8264d742885e77bde05d93383b823001ae8f6";
data["grant_type"] = "refresh_token";
var Response = wb.UploadValues(url, "POST", data);
string responseInString = Encoding.UTF8.GetString(Response);
var obj = JObject.Parse(responseInString);
if (obj["access_token"] != null)
access_token = obj["access_token"].ToString().Replace("\"", "");
Now, you have refresh token so you can use this whenever you call any API method and it will respond you in xml. You can also use json option tog et response in json. Its depend on you how you want their response format.
You can refer this
https://www.stoodq.com/article/zoho-crm-api-in-asp.net-6 as there is one sample code available which red customer in xml format.
I hope this help you.