电话号码确认
django-Rest-phonenumber-confirmation的Python项目详细描述
django Rest电话号码确认
- 一个Django库,用于使用twilio确认电话号码,并进行电话号码验证
快速启动
要安装django drf auth,只需在shell中运行此命令
pip install django-Rest-phonenumber-confirmation
设置
^{pr2}$别忘了做
python manage.py migrate
网址
urlpatterns = [
# ...
path('phone-confirm/api/', include('phonenumber_confirmation.urls')),
]
API端点:
创建电话号码并发送确认信息
方法:POST
终结点:/phone-number/sent/
有效载荷:{ "phone": "PHONE NUMBER" }
确认电话号码
方法:POST
终结点:/phone-number/confirmation/
有效载荷:{ "pin": "PIN" }
重新发送确认至电话号码
方法:POST
终结点:/resend/<int:phonenumber_id>/confirmation/
Param:phonenumber_id=电话号码对象id
PYPI
- 项目
标签: