53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
# from django.conf import settings
|
|
# settings.configure()
|
|
#
|
|
# from sms import Message
|
|
#
|
|
# message = Message(
|
|
# 'Here is the message',
|
|
# '+12065550100',
|
|
# ['+441134960000']
|
|
# )
|
|
# print(message)
|
|
|
|
from twilio.rest import Client
|
|
|
|
account_sid = 'AC988fcc2cce8ae4f36ffc58bf897bcb1d'
|
|
auth_token = '8e5a85e1fe8d48d73b8247bdee3ec65a'
|
|
client = Client(account_sid, auth_token)
|
|
|
|
message = client.messages.create(
|
|
from_='+12313103856', #twilio phone number
|
|
body='أول رسالة من هيكل .. السلام عليكم',
|
|
to='+966535521547',
|
|
)
|
|
|
|
print(message.sid)
|
|
|
|
# from twilio.rest import Client
|
|
#
|
|
# account_sid = 'AC988fcc2cce8ae4f36ffc58bf897bcb1d'
|
|
# auth_token = '8e5a85e1fe8d48d73b8247bdee3ec65a'
|
|
# client = Client(account_sid, auth_token)
|
|
#
|
|
# message = client.messages.create(
|
|
# from_='+12313103856',
|
|
# to='+966535521547'
|
|
# )
|
|
#
|
|
# print(message.sid)
|
|
|
|
|
|
# from twilio.rest import Client
|
|
#
|
|
# account_sid = settings.TWILIO_ACCOUNT_SID
|
|
# auth_token = settings.TWILIO_AUTH_TOKEN
|
|
# client = Client(account_sid, auth_token)
|
|
#
|
|
# verification_check = client.verify \
|
|
# .v2 \
|
|
# .services('VA4a22a04749e04800cc89f687df8732d3') \
|
|
# .verification_checks \
|
|
# .create(to='+966535521547', code='[Code]')
|
|
#
|
|
# print(verification_check.status) |