New SDKs Released!
We have released new versions of our SDKs, now supporting the latest version of our APIs. Explore them here.
Java SDK - Overview
Java SDK offers a way create client java applications that can be integrated with Zoho CRM. This makes access and use necessary CRM APIs easy. In other words, it serves as wrapper for REST APIs, making easier services A point note would developer application should programming code elements along interface implementations, instances or objects. Authentication is through OAuth2.0 authentication mechanism. Invariably, HTTP requests responses are taken care by SDK. sample how an acts middleware between application. <div> <img style=" alt="" src="/sites/zweb/images/crm/sdk-middleware.jpg">
Note:
We have updated our SDK package name. Yet, you can find our old versions below:
Java SDK allows you to
- Exchange data between Zoho CRM and the client application where the CRM entities are modeled as classes.
- Declare and define CRM API equivalents as simple functions in your Java application.
- Push data into Zoho CRM by accessing appropriate APIs of the CRM Service.
Note:
- For the sake of better explanation, we have used Eclipse to describe how to get started on using the SDK.
Environmental Setup
Java SDK requires Java (version 8 and above) to be setup in your development environment.
Including the SDK in your project
Java SDK is available through Maven distribution. You can include the SDK to your project using:
- Maven
- Gradle
- Downloadable JARs (by Zoho)
Maven Distribution
Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of building software: first, it describes how software is built, and second, it describes its dependencies.
If you are using Maven to build your project, we already have the dependencies set up.
You just need to include the following in your pom.xml file, which will get created once your Java project is created using Maven.
<repositories> <repository> <id>zohocrm-sdk</id> <url>https://maven.zohodl.com</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.zoho.crm</groupId> <artifactId>zohocrmsdk-2-0</artifactId> <version>1.0</version> </dependency> </dependencies>
Gradle
repositories{ maven { url "https://maven.zohodl.com" } } dependencies{ implementation 'com.zoho.crm:zohocrmsdk-2-0:1.0' }
Downloadable JAR file
This version downloads only the SDK without the dependent jars. Add the following jars to the referenced libraries of your project.
- commons-lang3-3.9.jar
- httpclient-4.4.1
- httpcore-4.4.4
- httpmime-4.5.3
- json-20170516
- commons-logging-1.1.3
- mysql-connector-java-5.1.47-bin.jar
- opencsv-5.0.jar
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.