cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The Sinch Node.js SDK was designed for developers. The SDK components are built with the specific language first and foremost in mind. After that, our focus was to keep the design simple for users that only want to leverage specific API calls they use but ensure customizability and future-proof access to other parts of our infrastructure. 

 

The Node.js SDK has added common capabilities to further streamline the interaction with our platform: 

  • We have provided a simple HTTP component for ease of use.
  • We have provided automated token management/refresh code, so developers can use the system without micromanaging their authorization/authentication.
  • We have provided webhook helpers to serialize/deserialize in communication with our servers and validate webhook authentication.

Another goal of ours while designing this new Node.js SDK was to mimic our REST APIs as much as possible, while still providing a Node.js developer experience.  We also use IDE type hints which, along with the REST API specification, allows the user to perform most API interactions without the need to use reference documentation.  With all these common items, we hope to build out consistent frameworks with functionality all users will commonly leverage.

 

Discoverability is one of the key components of great DX, hence Node.js SDK namespaces are small and specific yet descriptive.

 

For example:

const response = await sinchClient.numbers.availableNumber.list({
  regionCode: 'US',
  type: 'LOCAL',
  capabilities: ['SMS', 'VOICE'],
});

 

The main client class organizes the Sinch product portfolio (called domains within SDK) and its features into hierarchy that produces an API that is easy to read and discover.

 

JS_TS blog.jpg

Currently, we support Node.js 18 (Hydrogen) and Node.js 20 LTS (Iron) versions. Language versions will be supported until EOL.

 

One 3rd party library is used by the Node.js SDK, the node-fetch package, until it can be removed when the oldest version to support will be Node.js 21 which supports the Fetch API natively.

For now, SMS, Numbers, Verification and Voice APIs are supported, with other public Sinch APIs to be added soon.

 

For further details and to download our SDK, please refer to:

 

GitHub: https://github.com/sinch/sinch-sdk-node

NPM: https://www.npmjs.com/package/@sinch/sdk-core

Featured Article
Version history
Last update:
‎03-28-2024 04:22 AM
Updated by: