Conversation Provider
The Conversation provider allows you to listen for webhooks from the Conversation API.
Functions
onConversationEvent- this allows you to listen for and filter Conversation API events. See the code snippet here.
Note: Use the vcr.verifyAuth method to verify that callbacks originate from the Cloud Runtime Platform.
Initializing the Conversation Provider
To use the Conversation Provider you need to create an instance of the provider using a session:
const session = vcr.createSession();
const messaging = new Conversation(session);
Use Case
For example, to use the use the Conversation provider to listen for conversation events for a Vonage application:
const session = vcr.createSession();
const conversation = new Conversation(session);
await conversation.onConversationEvent("onEvent");