@vonage/vcr-sdk
v1.3.0
Published
This is the Node.JS SDK for [Vonage Cloud Runtime](https://developer.vonage.com/cloud-runtime). To use it you will need a Vonage account. Sign up for free at [vonage.com](https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaig
Downloads
47,550
Maintainers
Keywords
Readme
Vonage Cloud Runtime SDK for Node.js
This is the Node.JS SDK for Vonage Cloud Runtime. To use it you will need a Vonage account. Sign up for free at vonage.com.
For full documentation refer to developer.vonage.com.
Installation
To install the SDK run:
npm install @vonage/vcr-sdk
Usage
The Vonage Cloud Runtime SDK gives you access to providers which help you build powerful communication applications with Vonage. As an example here is how you can listen for incoming calls to your Vonage Application with the Voice provider:
import { Voice, vcr } from '@vonage/vcr-sdk';
const session = vcr.createSession();
const voice = new Voice(session);
await voice.onCall('onCall');
app.post('/onCall', async (req, res, next) => {
const ncco = [
{
action: 'talk',
text: "Hi from Vonage!",
}
];
res.json(ncco);
});
Get Started
The Vonage Cloud Runtime SDK has been designed for use with the Vonage Cloud Runtime Marketplace. There you will find prebuilt solutions to common communication workflows with Vonage, where you can try them out and edit them to fit your use case. Once finished, you can deploy the application and let Vonage manage the hosting for you.