JavaScript
Create a webhook
-
To create a webhook, make a
POST
request to:https://api.vonage.com/t/vbc.prod/vis/v1/self/webhooks/
-
In the body of the request, you will need to enter the following JSON:
{ "url": "{YOUR_URL}", "events": [ "CALL" ], "signingAlgo": "HMAC_SHA256", "signingKey": "string", "metadataPolicy": "NONE" }
-
The full curl request will look like the following:
curl --location --request POST 'https://api.vonage.com/t/vbc.prod/vis/v1/self/webhooks/' \ --header 'Authorization: Bearer {ACCESS_TOKEN}' \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "https://{NGROK_URL}/webhook", "events": [ "CALL" ], "signingAlgo": "HMAC_SHA256", "signingKey": "string", "metadataPolicy": "NONE"
In the
url
parameter, you will need to add your accessible URL. This URL will be called by the Vonage Integration Platform API when a call has been updated. A good way to create an accessible URL is to use ngrok to expose a port on your local machine.
Next, you will create your local server. To create your local server, we will be using ExpressJS for the NodeJS application.
Log incoming calls to Salesforce
Logging incoming calls into SalesforceSteps