A Django app for telecom system.
Project description
This is a Django app used in REST APIs to send SMS and OTP on user mobile number and verify the number using OTP entered by user.This app is using TWILIO service to send sms, So before using this app make sure you have TWILIO account.
You can refer this TWILIO doc to know more.
https://www.twilio.com/docs/sms/quickstart/python
Quick start
Add “telecom” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'telecom', ]
Add these attribute to your setting like this:
TWILIO_ACCOUNT_SID = 'set your ACCOUNT_SID' TWILIO_SERVICE_SID = 'set your SERVICE_SID' TWILIO_AUTH_TOKEN = 'set your AUTH_TOKEN' TWILIO_PHONE_NUMBER = 'set your PHONE_NUMBER'
- Include the telecom URLconf in your project urls.py like this::
path(‘telecom/’, include(‘telecom.urls’), name=’telecom’),
- Send POST request http://127.0.0.1:8000/telecom/send-otp/ to send otp on user mobile::
{
“telecom”: “mobile number” .. +919134454343 “channel”: “sms”
}
- Send POST request http://127.0.0.1:8000/telecom/verify-otp/ to verify OTP::
{
“telecom”: “mobile number” .. +9134454343 “code”: “code” .. 343433
}
- Send POST request http://127.0.0.1:8000/telecom/send-sms/ to send sms::
{
“telecom”: “mobile number” .. +919134454343 “body”: “message” .. Hi Zen!
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_message-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc65d1eb8a3fb1aedfaaea384373331a65585d1f993f678a4fb2f0985be34bc3 |
|
MD5 | d55d02918bfff70fbc3b7ff56ba9dada |
|
BLAKE2b-256 | 3ac4b075739a3ef1d66bfa0983ecee18ba70f01be6d694b04a9fe70b929b6ab7 |