-
Notifications
You must be signed in to change notification settings - Fork 189
Vonage Server SDK
Documentation / Vonage Server SDK
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.
npm install @vonage/server-sdkyarn add @vonage/server-sdkconst { 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
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',
});Run:
npm run testOr to continually watch and run tests as you change the code:
npm run test-watchSee the Vonage Node Quickstarts repo.
You can find more information for each product below:
- Accounts
- Applications
- Audit
- Auth
- JWT
- Messages
- Number Insight V2
- Number Insights
- Numbers
- Pricing
- Server Client
- Server SDK
- SMS
- Sub Accounts
- Verify
- Verify V2
- Vetch
- Video
- Voice
The following is a list of Vonage APIs and whether the Node Server SDK provides support for them:
| API | API Release Status | Supported? |
|---|---|---|
| Account API | General Availability | ✅ |
| Alerts API | General Availability | ✅ |
| Application API | General Availability | ✅ |
| Audit API | Beta | ✅ |
| Conversation API | General Availability | ✅ |
| Dispatch API | Beta | ❌ |
| External Accounts API | Beta | ❌ |
| Media API | Beta | ✅ |
| Messages API | General Availability | ✅ |
| Meetings API | Deprecated | ✅ |
| Number Insight V2 API | Beta | ✅ |
| Number Insights API | General Availability | ✅ |
| Number Management API | General Availability | ✅ |
| Pricing API | General Availability | ✅ |
| Proactive Connect API | Deprecated | ✅ |
| Redact API | Developer Preview | ✅ |
| Reports API | Beta | ✅ |
| SMS API | General Availability | ✅ |
| Sub Accounts | Beta | ✅ |
| Users | General Availability | ✅ |
| Verify API | General Availability | ✅ |
| Verify v2 API | General Availability | ✅ |
| Video API | General Availability | ✅ |
| Voice API | General Availability | ✅ |
The following Network APIs are supported however they are opt-in.
| API | Supported? |
|---|---|
| Number Verification | ✅ |
| SIM Swap | ✅ |
While most of the V2 functions have been ported into their own package, some of the functions have not been ported or were removed. Below is a list of those changes:
| V2 Function | Status | Note |
|---|---|---|
vonage.conversion |
REMOVED | |
vonage.conversation |
Moved | Moved To Conversations |
vonage.app |
Moved | Moved to Applications |
vonage.files |
Moved | Move to ServerClient |
vonage.message |
Moved | Moved to SMS |
vonage.generateJwt |
Moved | Was moved to JWT |
vonage.generateSignature |
Moved | Was moved to SMS and Voice |
vonage.calls |
Moved | Was moved to Voice |
vonage.credentials |
Updated | Options can be found in Server Client |
vonage.options |
Updated | Options can be found in Server Client |
vonage.options.httpClient |
Removed | |
vonage.options.userAgent |
Moved | Options can be found in Server Client |
For more information, check out each packages migration guide.
Defined in: vonage.ts:21
Represents the Vonage SDK for interacting with Vonage APIs.
new Vonage(credentials, options?): Vonage;Defined in: vonage.ts:112
The credentials used for authentication.
The authentication credentials.
Optional configuration parameters.
accounts: Accounts;Defined in: vonage.ts:35
Provides access to the Accounts API.
applications: Applications;Defined in: vonage.ts:40
Provides access to the Applications API.
conversations: Conversations;Defined in: vonage.ts:105
Provides access to the Conversations API.
protected credentials: AuthInterface;Defined in: vonage.ts:25
The credentials used for authentication.
messages: Messages;Defined in: vonage.ts:45
Provides access to the Messages API.
numberInsights: NumberInsights;Defined in: vonage.ts:50
Provides access to the Number Insights API.
numbers: Numbers;Defined in: vonage.ts:55
Provides access to the Numbers API.
protected options: ConfigParams;Defined in: vonage.ts:30
Optional configuration parameters.
pricing: Pricing;Defined in: vonage.ts:60
Provides access to the Pricing API.
redact: Redact;Defined in: vonage.ts:65
Provides access to the Redact API.
secrets: Secrets;Defined in: vonage.ts:70
Provides access to the Secrets API.
sms: SMS;Defined in: vonage.ts:75
Provides access to the SMS API.
users: Users;Defined in: vonage.ts:80
Provides access to the Users API.
verify: Verify;Defined in: vonage.ts:90
Provides access to the Verify API.
verify2: Verify2;Defined in: vonage.ts:85
Provides access to the Verify V2 API.
video: Video;Defined in: vonage.ts:100
Provides access to the Video API.
voice: Voice;Defined in: vonage.ts:95
Provides access to the Voice API.