Node.js SDK


The Uni Node.js SDK is hosted by npm and is available from the public npm repository.

Add unisms to the project as a dependency:

npm i unisms

or use Yarn:

yarn add unisms


The following example shows how to use the Uni Node.js SDK to quickly invoke a service.

Send an SMS

import UniSMS from 'unisms'

// initialization
const client = new UniSMS({
  accessKeyId: 'your access key id',
  accessKeySecret: 'your access key secret',  // if you use the simple auth mode, just delete this line
  endpoint: '' // set endpoint

// send the message
  to: 'your phone number',
  signature: 'Unimatrix',
  templateId: 'pub_verif_basic',
  templateData: {
    code: 7777,
  .then(ret => {'Result:', ret)
  .catch(e => {