{"repo":"zhuoyanzhe/SmsCodeWebhook","free":true,"listed":false,"github":"https://github.com/zhuoyanzhe/SmsCodeWebhook","clone":"git clone https://github.com/zhuoyanzhe/SmsCodeWebhook.git","description":"自用验证码的接收webhook","language":"Python","stars":45,"topics":["django","django-ninja","redis","sms"],"license":null,"category":"databases-storage","readme_excerpt":"SmsCodeWebook 介绍 - 自用验证码的接收webhook, 基于django-ninja, redis - 提供/api/getCode和/api/sendSmsMsg 2个接口 - 整体步骤如下： - 业务方手动或自动触发发送短信验证码, 然后调用SmsCodeWebook的/api/getCode, 等待返回验证码； - 移动端(android等) 使用工具(如SmsForwarder) 监听手机短信 - 当工具监听到验证码短信时, 调用SmsCodeWebook的/api/sendSmsMsg接口发送短信内容； - SmsCodeWebook接受到短信内容后, 将验证码从短信中匹配出来, 存到redis中； - SmsCodeWebook从redis取出key, 返回验证码给业务方。 使用文档 1、docker部署(推荐) 下载镜像 运行 使用默认settings.py 自定义settings.py 测试 开2个终端测试 终端1 调用/api/getCode, 等待验证码 终端2 调用/api/sendSmsMsg，发送验证消息 重回终端1 看到验证码返回 2、本地部署 安装依赖 安装redis 自行安装 配置settings.py 复制settings example.py, 重命名为settings.py 添加redis配置 编辑settings.py 运行服务 接口说明 1. Send SMS Message Endpoint POST /api/sendSmsMsg Description 发送验证码短信原文 Body Content-Type: application/json 2. Get Code Endpoint POST /api/getCode Description 获取验证码 Body Content-Type: application/json","default_branch":null,"files":null,"tree":[],"storefront":"/r/zhuoyanzhe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zhuoyanzhe/SmsCodeWebhook/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}