Working with zoho api in asp.net C# RRS feed

  • Question

  • User904777427 posted


    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#.

    Vinod Suri

    Tuesday, February 16, 2010 5:57 AM

All replies

  • User-1659704165 posted


    Read its documets.

    Tuesday, February 16, 2010 11:42 PM
  • User904777427 posted

    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.


    Vinod Suri 

    Wednesday, February 17, 2010 12:09 AM
  • User-635215137 posted

    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

    Saturday, October 16, 2010 1:07 PM
  • User1479201452 posted

    Hello James

    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 https://accounts.zoho.com/developerconsole

    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.

    Thank you

    Saturday, May 4, 2019 10:17 AM