Home

Awesome

Phone Verify API

This is an open source application designed to show the usage of modern serverless compute platforms such as AWS Lambda and DynamoDB. It is built and deployed using the AWS Cloud Development Kit.

This is a service that can be used by an application to check that a user is the owner of the phone number they provide.

Watch me build this application on YouTube

Architecture

Diagram

API

Start verification

When a user is validating their phone number, the service will send a 6 digit verification code by SMS and waits for their response.

Start Request:

POST /verify/start

{ "Phone": "+64223062141" }

Start Response:

{ "Id": "44c090cc-2ca0-491e-a4d0-dd2b2d4efadb" }

Check verification

The service checks the users input matches the code. If they match it marks the phone number as verified.

Check Request

POST /verify/check

{ "Id": "44c090cc-2ca0-491e-a4d0-dd2b2d4efadb", "Code": "654321" }

Check Response:

{ "Verified": true }

Verification Status

Use this endpoint to check the status of a verification.

Status Request

POST /verify/status

{ "Id": "44c090cc-2ca0-491e-a4d0-dd2b2d4efadb" }

Status Response:

{ "Verified": true }

Errors

Errors will be returned with a 400 status code and a simple error message.

{ "Error": "Phone required" }

Rate limiting

Start Verification

Check Verification

Verification Status