Sample application that automatically texts all participants in a secret santa their assigned person!
You will need to set up:
- Launch site with form to submit multiple participants in Secret Santa
- Have the assignments automatically sent to each participant's phone number
The following environmental variables need to be set
Variable | Description |
---|---|
TELNYX_API_KEY |
Your Telnyx API Key |
TELNYX_PHONE NUMBER |
Your Telnyx Phone Number |
APP_PORT |
Defaults to 5000 The port the app will be served |
This app uses several pip packages to execute. To install run the following:
$ pip install [requirement]
Requirements:
telnyx
os
random
phonenumbers
dotenv
flask
This app uses the excellent python-dotenv package to manage environment variables.
Make a copy of .env.sample
and save as .env
and update the variables to match your creds.
TELNYX_API_KEY="YOUR_API_KEY"
TELNYX_NUMBER="YOUR_TELNYX_NUMBER"
APP_PORT=5000
Run the following commands to get started
$ git clone https://github.com/d-telnyx/demo-python-telnyx.git
Start the server python main.py
Once everything is setup, you should now be able to:
- Run the server and access it at localhost:PORT (i.e. localhost:5000)
- Add participants to the secret santa and have their pairs generated
- Have texts sent to all participants informing them who they are buying presents for!
Happy Holidays!