C# SDK - Overview

C# SDK offers a way to create client C# applications that can be integrated with Zoho CRM. This SDK makes the access and use of necessary CRM APIs with ease. In other words, it serves as a wrapper for the REST APIs, making it easier to use the services of Zoho CRM.

A point to note would be that the developer of the client application should create programming code elements along with interface implementations, instances or objects. Authentication to access Zoho CRM APIs is through OAuth2.0 authentication mechanism. Invariably, HTTP requests and responses are taken care of by the SDK.

A sample of how an SDK acts a middle ware or interface between Zoho CRM and a client C# application.

C Sharp SDK Middleware Image
Note:

We have updated our SDK package name. Yet, you can find our old versions below:

C# SDK allows you to

  1. Exchange data between Zoho CRM and the client application where the CRM entities are modeled as classes.
  2. Declare and define CRM API equivalents as simple functions in your C# application.
  3. Push data into Zoho CRM by accessing appropriate APIs of the CRM Service.

Environmental Setup

C# SDK requires .NET Framework 4.6.1(or above) or .Net Core 2.X(or above) to be set up in your development environment. The compatibility warning can be ignored

Note

The warning occurs because we have supported .NET Framework 4.6.1 to make the C# SDK compatible with older versions of Visual Studio (For instance, Visual Studio 2015). We assure you that all the functionalities in the SDK works to the utmost perfection.

Including the SDK in your project

You can include the SDK to your project using:

Install Visual Studio IDE from Visual Studio (if not installed).

C# SDK is available as a Nuget package. The SDK requires the following from the client app:

The ZCRMSDK assembly can be installed through the Nuget Package Manager and through the following options:

  • Packet Manager

    Install-Package ZOHOCRMSDK-2.0 -Version 1.0.0
    Install-Package MySql.Data -Version 6.9.12
    Install-Package Newtonsoft.Json -Version 11.0.1

  • .NET CLI

    dotnet add package ZOHOCRMSDK-2.0 --version 1.0.0
    dotnet add package Newtonsoft.Json --version 11.0.1
    dotnet add package MySql.Data --version 6.9.12

  • Package Reference

    For projects that support PackageReference, copy this XML node into the project file to refer the package.

    <ItemGroup>
    <PackageReference Include="ZOHOCRMSDK-2.0" Version="1.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
    <PackageReference Include="MySql.Data" Version="6.9.12" />
    </ItemGroup>

Note
  • The access and refresh tokens are environment-specific and domain-specific. When you handle various environments and domains such as Production, Sandbox, or Developer and IN, CN, US, EU, or AU, respectively, you must use the access token and refresh token generated only in those respective environments and domains. The SDK throws an error, otherwise.
    For example, if you generate the tokens for your Sandbox environment in the CN domain, you must use only those tokens for that domain and environment. You cannot use the tokens generated for a different environment or a domain.

  • For Contact Roles and Records API, you will need to provide the ZohoCRM.settings.fields.ALL scope along with the ZohoCRM.modules.ALL scope while generating the OAuthtoken. Otherwise, the system returns the OAUTH-SCOPE-MISMATCH error

  • For Related Records API, the scopes required for generating OAuthtoken are ZohoCRM.modules.ALL, ZohoCRM.settings.fields.ALL and ZohoCRM.settings.related_lists.ALL. Otherwise, the system returns the OAUTH-SCOPE-MISMATCH error