TypeScript SDK - Overview
TypeScript SDK offers a way to create client TypeScript applications that can be integrated with Zoho CRM.
We have updated our SDK package name. Yet, you can find our old versions below:
Environmental Setup
TypeScript SDK is installable through npm. npm is a tool for dependency management in TypeScript. The SDK expects the following from the client app:
The client app must have Node (version 12 and above).
TypeScript SDK must be installed into the client app through npm.
Including the SDK in your project
You can include the SDK in your project by one of the following ways:
- Installing Node from nodejs.org (if not installed).
- Installing the TypeScript SDK:
- Navigate to the workspace of your client app.
- Run the following command:
npm install @zohocrm/typescript-sdk-2.0
The TypeScript SDK will be installed and a package named @zohocrm/typescript-sdk will be created in the local machine.
Another method to install the SDK:
- Add dependencies to the package.json of the node server with the latest version (recommended).
- Run npm install in the directory which installs all the dependencies mentioned in package.json.
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