For new development, we encourage you to use the Verify API instead of the Authy API. The Verify API is an evolution of the Authy API with continued support for SMS, voice, and email one-time passcodes, an improved developer experience and new features.
Please visit the Verify Quickstarts Page to get started with the Verify API. Thank you!
This application example demonstrates how to implement Account Verification on a Python Flask application using Authy.
Create a free Authy application, if you don't have one already.
This project is built using the Flask web framework. For now, it only runs on Python 2.7 (not 3.4+).
-
To run the app locally, clone this repository and
cd
into it. -
Create and activate a new python3 virtual environment.
python3 -m venv venv source venv/bin/activate
-
Install the requirements.
pip install -r requirements.txt
-
Copy the sample configuration file and edit it to match your configuration.
cp .env.example .env
Twilio API credentials can be found here and find you can create a REST API Key here. If using the twilio CLI you can run:
twilio api:core:keys:create --friendly-name=worm-transfer -o json
Copy or create a Twilio phone number from here.
-
Run the migrations.
python manage.py db upgrade
-
Start the development server.
python manage.py runserver
-
Go to http://127.0.0.1:5000/.
That's it!
python manage.py test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.