Redact using an ID

In this code snippet you see how to redact a message using an ID

Example

Replace the following variables in the example code:

KeyDescription
VONAGE_REDACT_ID

The ID of the data record that you'd like to redact

VONAGE_REDACT_TYPE

The product that the ID belongs to e.g. sms

Prerequisites

Create a file named transaction.js and add the following code:

View full source

Write the code

Add the following to transaction.js:

View full source

Run your code

Save this file to your machine and run it:

node transaction.js