Python

Create a local server using Python application

To use a Flask app

  1. Create a virtual environment. Python 3 comes with venv to create virtual environments. In your project directory, create a new virtual environment and activate it.
python3 -m venv venv . venv/bin/activate
  1. Install Flask:
pip install Flask
  1. Create a new file called app.py and create the application:
  1. Run the application:
export FLASK_APP=app.py flask run -h localhost -p 3000

This application will run on port 3000, which is the same port you should have configured for ngrok. Now, when you make a call to or receive a call from your Vonage Business Communications number, the application will print the events to the console.

Receiving call events using webhooks

Create a webhook to receive events from calls

以下の言語で利用可能:
JavaScript Python
手順
1
Introduction to this task
2
Prerequisites
3
Create a webhook
4
Create a local server
5
Create a webhook
6
Cleanup
7
What's next?