Python
Create a local server using Python application
To use a Flask app
- Create a virtual environment. Python 3 comes with
venvto create virtual environments. In your project directory, create a new virtual environment and activate it.
python3 -m venv venv . venv/bin/activate
- Install Flask:
pip install Flask
- Create a new file called
app.pyand create the application:
- 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
手順
1
Introduction to this task2
Prerequisites3
Create a webhook4
Create a local server5
Create a webhook6
Cleanup7
What's next?