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!
When a new user signs up for your application, you want to make sure their contact information is accurate. You also like to have some assurance they are in fact a human being! You want to make sure that every new user account in your system is an actual person you can serve.
This project is build using Node.js and depends on MongoDB.
-
First clone this repository and
cd
into it.git clone [email protected]:TwilioDevEd/account-verification-node.git cd account-verification-node
-
Copy the sample configuration file and edit it to match your configuration.
cp .env.example .env
You can find your
TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
in your Twilio Account Settings.You will also need a
TWILIO_NUMBER
, which you may find in the Twilio phone numbers console.The
AUTHY_API_KEY
can be found in the Authy dashboard.Leave
MONGO_URL
with the default value ofmongodb://localhost/account-verification
. -
Start the server.
npm start
-
Check it out at http://localhost:3000.
-
Make sure Docker and docker-compose are installed.
-
Set
TWILIO_ACCOUNT_SID
,TWILIO_AUTH_TOKEN
,TWILIO_NUMBER
andAUTHY_API_KEY
configuration variables as explained above. -
Build the containers with:
docker-compose build
- Get the name of the Mongo container with:
docker-compose ps
Then set the MONGO_URL
configuration variable in .env
to mongodb://{mongo-container-name}/account-verification
.
-
Remove the project's node_modules folder.
-
Finally, run the following commands to start your Docker containers.
docker-compose up -d
-
Check it out at http://localhost:3000.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.