Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- url = 'https://api.twilio.com/2010-04-01/Accounts/{0}/Messages.json'.format(settings.OTP_TWILIO_ACCOUNT)
- data = {
- 'From': settings.OTP_TWILIO_FROM,
- 'To': '+38050xxxxxxx',
- 'Body': 'Your verification code is 12345',
- }
- response = requests.post(
- url, data=data,
- auth=(settings.OTP_TWILIO_ACCOUNT, settings.OTP_TWILIO_AUTH)
- )
- response.raise_for_status()
- print(response.json())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement