Get audit event

In this code snippet you see how to get a single audit event, referenced by its UUID.


You will need to ensure that the following replaceable values are set in the example code using any convenient method:

Key Description
VONAGE_API_KEY Your Vonage API key.
VONAGE_API_SECRET Your Vonage API secret.
EVENT_UUID The UUID of the audit event you want to retrieve.

In the following example the Create an application and Initialize your dependencies procedures are optional.


A Nexmo application contains the required configuration for your project. You can create an application using the Nexmo CLI (see below) or via the dashboard. To learn more about applications see our Nexmo concepts guide.

Install the CLI

npm install -g nexmo-cli

Create an application

Once you have the CLI installed you can use it to create a Nexmo application. Run the following command and make a note of the application ID that it returns. This is the value to use in NEXMO_APPLICATION_ID in the example below. It will also create private.key in the current directory which you will need in the Initialize your dependencies step

Nexmo needs to connect to your local machine to access your answer_url. We recommend using ngrok to do this. Make sure to change in the examples below to your own ngrok URL.

nexmo app:create "Get Event" --keyfile private.key

Create a file named and add the following code:

Copy to Clipboard
source "../"

View full source

Write the code

Add the following to

Copy to Clipboard
curl "$EVENT_UUID" \

View full source

Run your code

Save this file to your machine and run it:


Try it out

Run the command in a shell. The call will retrieve the specified audit event.