sms bullshit
This commit is contained in:
+3
-1
@@ -24,4 +24,6 @@ SITE_TITLE = ''
|
|||||||
SITE_HEADER = ''
|
SITE_HEADER = ''
|
||||||
# jwt token configs
|
# jwt token configs
|
||||||
ACCESS_TOKEN_LIFETIME = 5000
|
ACCESS_TOKEN_LIFETIME = 5000
|
||||||
REFRESH_TOKEN_LIFETIME = 5000
|
REFRESH_TOKEN_LIFETIME = 5000
|
||||||
|
|
||||||
|
SMS_API_KEY = ''
|
||||||
@@ -26,6 +26,7 @@ factory_boy==3.3.1
|
|||||||
Faker==28.4.1
|
Faker==28.4.1
|
||||||
frozenlist==1.4.1
|
frozenlist==1.4.1
|
||||||
geoip2==4.8.0
|
geoip2==4.8.0
|
||||||
|
ghasedak_sms==1.0.3
|
||||||
gnupg==2.3.1
|
gnupg==2.3.1
|
||||||
h11==0.14.0
|
h11==0.14.0
|
||||||
httpagentparser==1.9.5
|
httpagentparser==1.9.5
|
||||||
|
|||||||
@@ -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')
|
||||||
Reference in New Issue
Block a user