Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakejscott/aws-cdk-phone-verify-api
Phone verification service built using: AWS cdk, api gateway, dotnet, lambda, dynamodb, and sns
https://github.com/jakejscott/aws-cdk-phone-verify-api
api-gateway aws aws-cdk cdk dotnet dynamodb lambda
Last synced: 6 days ago
JSON representation
Phone verification service built using: AWS cdk, api gateway, dotnet, lambda, dynamodb, and sns
- Host: GitHub
- URL: https://github.com/jakejscott/aws-cdk-phone-verify-api
- Owner: jakejscott
- Created: 2019-07-30T20:51:40.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-09T21:36:56.000Z (about 2 years ago)
- Last Synced: 2024-11-24T20:01:53.861Z (about 2 months ago)
- Topics: api-gateway, aws, aws-cdk, cdk, dotnet, dynamodb, lambda
- Language: C#
- Homepage:
- Size: 717 KB
- Stars: 7
- Watchers: 4
- Forks: 5
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cdk - GitHub repository - By Jake Scott. (Blog Posts & Talks / Multi-accounts setup)
README
# Phone Verify API
This is an open source application designed to show the usage of modern serverless compute platforms such as [AWS Lambda](https://aws.amazon.com/lambda/) and [DynamoDB](https://aws.amazon.com/dynamodb/). It is built and deployed using the [AWS Cloud Development Kit](https://docs.aws.amazon.com/CDK/latest/userguide/what-is.html).
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](https://www.youtube.com/watch?v=c9UXHPX6-Ns&list=PLbuD6VMxPZScqUXKm2QAc_InCGdP6jKJy)
## Architecture
![Diagram](docs/arch.png)
## 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`
```json
{ "Phone": "+64223062141" }
```*Start Response:*
```json
{ "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`
```json
{ "Id": "44c090cc-2ca0-491e-a4d0-dd2b2d4efadb", "Code": "654321" }
```*Check Response:*
```json
{ "Verified": true }
```### Verification Status
Use this endpoint to check the status of a verification.
*Status Request*
`POST /verify/status`
```json
{ "Id": "44c090cc-2ca0-491e-a4d0-dd2b2d4efadb" }
```*Status Response:*
```json
{ "Verified": true }
```### Errors
Errors will be returned with a 400 status code and a simple error message.
```json
{ "Error": "Phone required" }
```--------------
### Rate limiting
Start Verification
* The top is 10 every half an hour, per phone number.
Check Verification
* The top is 5 every day, per phone number.
Verification Status
* The top is 60 per minute, per phone number.
* The top is 180 per hour, per phone number.
* The top is 250 per day, per phone number.