sms bullshit

This commit is contained in:
Parsa Nazer
2024-12-15 21:09:58 +03:30
parent 4bb7f25228
commit 522583f876
3 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -24,4 +24,6 @@ SITE_TITLE = ''
SITE_HEADER = ''
# jwt token configs
ACCESS_TOKEN_LIFETIME = 5000
REFRESH_TOKEN_LIFETIME = 5000
REFRESH_TOKEN_LIFETIME = 5000
SMS_API_KEY = ''
+1
View File
@@ -26,6 +26,7 @@ factory_boy==3.3.1
Faker==28.4.1
frozenlist==1.4.1
geoip2==4.8.0
ghasedak_sms==1.0.3
gnupg==2.3.1
h11==0.14.0
httpagentparser==1.9.5
+16
View File
@@ -0,0 +1,16 @@
from dotenv import load_dotenv
import os
from ghasedak_sms import Ghasedak
load_dotenv(".env.local")
sms_api = Ghasedak(api_key=os.getenv("SMS_API_KEY"))
### ارسال پیامک تکی
# response = sms_api.send_single_sms(message=hello, world!, receptor='0935*****', linenumber='3000*****', senddate='', checkid='')
### ارسال پیامک گروهی
# response = sms_api.send_bulk_sms(message='hello, world!', receptors=['09xxxxxxxxx', '09xxxxxxxxx'], linenumber='3000*****', senddate='', checkid='')
### ارسال پیام otp
#response = sms_api.send_otp_sms(receptor='09359****', message='OTP message')