📣 Freshworks API SDK for Node.js

As part of our initiatives to improve tooling around our developer platform, we are pleased to announce a new Node.js API SDK for Freshworks REST APIs. The API SDK supports only the Freshteam REST API with this initial release.

Our goal is to eventually support all public REST APIs for Freshworks products and provide a uniform DX across all those APIs.

Who is it for

Today, the API SDK will be useful for developers who:

  • Want to build integrations with the Freshteam API from a Node.js application
  • Want to call the Freshteam REST API from the serverless functions of a Freshworks app
  • Want an idiomatic Node.js library to interact with the Freshteam REST API
  • Do not want to worry about coding HTTP requests manually
  • Want to do the above in TypeScript

As we add support for other products’ REST APIs in the SDK, developers will get similar DX and idiomatic Node.js APIs for those product APIs as well.

Where to find it

The API SDK is available on NPM as @freshworks/api-sdk. The latest published version as of this writing is v0.2.1.

Example usage

Here is a quick view of how the code looks:

const { Freshteam } = require("@freshworks/api-sdk");

const ft = new Freshteam(domain, apiKey);

Call the method to list all employees (who match search criteria):

const employees = await ft.employees.list({ first_name: "Arthur", last_name: "Dent" });

Documentation

For detailed documentation, including installation instructions, see the Node.js API SDK homepage. You can directly jump to the docs section on Freshteam. Plus, we have created a few sample apps to demonstrate how the API SDK works.

For those who prefer reference docs, see the generated documentation of the Freshteam class.

The source code for the API SDK is available at freshworks/freshworks-api-sdk on GitHub.

Feedback and reporting issues

While we have tested the API SDK to work in production, we still anticipate issues and feature gaps to exist. If you encounter problems or have a feature request, please open a new topic on the developer community forum.

Please feel free to add a comment to this post for any clarifications.

P.S. We would have ideally asked you to file an issue or a P.R. on the GitHub repository itself, but alas, enterprise VPN controls don’t allow us to do that. Yet.

7 Likes

In the Freshworks app, we have Request Method limitation (There is a rate limit of 50 requests per minute per app per account).

If we use API SDK, won’t count it as a Request Method?

1 Like

The API SDK does not use Request Method to send requests. It uses superagent under the hood, which might change to axios in the future. We have not found a good use case to use Request Method to send HTTP requests when a Freshworks app uses the API SDK.

So, you won’t hit Request Method rate limits. But you will still be bound by the REST API’s rate limits.

1 Like

That’s Awesome!!!

Mostly, request method limit is big problem in App. By using API SDK, we can reduce Request Method rate limits in the App.

3 Likes

A post was split to a new topic: How to build custom app in Freshdesk?

This topic was automatically closed after 60 days. New replies are no longer allowed.