Skip to main content
This guide shows you how to set up a local webhook testing environment using ngrok to receive and debug Interactly webhook events during development.
ngrok creates a secure tunnel to your local development server, making it accessible from the internet so Interactly can send webhook events to your local machine.

Prerequisites

Before getting started, make sure you have:
  • Python 3.7+ installed
  • ngrok account and installation (Download ngrok)
  • An Interactly assistant configured for testing

Setup Overview



Overview of the local testing setup with ngrok and a Python webhook server.

Step 1: Install Dependencies

Create a new directory for your webhook testing server:

Step 2: Create the Webhook Server

Create a file named webhook_server.py with the following code:

Step 3: Configure Environment (Optional)

Create a .env file for configuration:
.env

Step 4: Start ngrok Tunnel

Open a new terminal and start ngrok:
You’ll see output like this:

Terminal after running the 'ngrok' command forwarding to localhost:8080 — the 'Forwarding' URL is what we want.

Copy the ngrok URL: You’ll need the https://abc123.ngrok.io URL for the next step. This URL changes each time you restart ngrok (unless you have a paid plan with reserved domains).

Step 5: Start Your Webhook Server

In your first terminal, start the Python webhook server:
You should see output like:

Step 6: Configure Interactly Assistant

Now configure your Interactly assistant to use your ngrok webhook URL:

Via Dashboard UI

  1. Go to your Interactly dashboard
  2. Select your test assistant
  3. Navigate to Advanced Tab
  4. Scroll to Server Configuration
  5. Fill in the webhook settings:

Via API

Step 7: Test Your Setup

Test the Webhook Endpoint

First, verify your webhook endpoint is accessible:

Start a Test Call

  1. Go to your Interactly dashboard
  2. Start a test call with your configured assistant
  3. Speak a few messages
  4. End the call

Monitor the Logs

Watch your webhook server terminal for incoming events:

Advanced Testing Features

Event Filtering and Analysis

Add custom filtering to focus on specific events:

Save Events to File

Store webhook events for later analysis:

Metrics Collection

Track webhook statistics:

Troubleshooting

Common Issues

Debug Mode

Add debug logging to your webhook server:

ngrok Web Interface

Visit http://localhost:4040 to see:
  • Request/response logs
  • Traffic inspection
  • Tunnel status
  • Error diagnostics

Production Considerations

When moving from testing to production:
  1. Use HTTPS: Always use HTTPS endpoints in production
  2. Implement Authentication: Use webhook secrets and additional security
  3. Add Rate Limiting: Protect against excessive webhook calls
  4. Error Handling: Implement robust error handling and recovery
  5. Monitoring: Add proper logging and alerting
  6. Idempotency: Handle duplicate events gracefully

Next Steps

Once your local testing is working, deploy your webhook server to a production environment and update your assistant configuration with the production URL.