@vonage/server-sdk
@vonage/server-sdk
npm i @vonage/server-sdk
@vonage/server-sdk

@vonage/server-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

by Vonage

3.2.0 (see all)License:Apache-2.0TypeScript:Built-In
npm i @vonage/server-sdk
Readme

Vonage Server SDK for Node.js

GitHub Workflow Status (branch) Codecov Latest Release Contributor Covenant License

Vonage

This is the Node.JS Server SDK for Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.

For full API documentation refer to developer.vonage.com.

Installation

With NPM

npm install @vonage/server-sdk

With Yarn

yarn add @vonage/server-sdk

Constructor

const { Vonage } = require('@vonage/server-sdk');

const vonage = new Vonage(credentials, options);

Where credentials is any option from @vonage/auth, and options is any option from @vonage/server-client

Promises

Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use await to wait for a response.

const resp = await vonage.sms.send({
    to: '15552220000',
    from: '15559992222',
    text: 'This is a test',
});

Testing

Run:

npm run test

Or to continually watch and run tests as you change the code:

npm run test-watch

Examples

See the Vonage Node Quickstarts repo.

References

You can find more information for each product below:

Supported APIs

The following is a list of Vonage APIs and whether the Node Server SDK provides support for them:

APIAPI Release StatusSupported?
Account APIGeneral Availability
Alerts APIGeneral Availability
Application APIGeneral Availability
Audit APIBeta
Conversation APIBeta
Dispatch APIBeta
External Accounts APIBeta
Media APIBeta
Messages APIBeta
Number Insight APIGeneral Availability
Number Management APIGeneral Availability
Pricing APIGeneral Availability
Redact APIDeveloper Preview
Reports APIBeta
SMS APIGeneral Availability
Verify APIGeneral Availability
Voice APIGeneral Availability