Skip to content

Instantly share code, notes, and snippets.

@ragowthaman
Created August 2, 2016 18:41
Show Gist options
  • Select an option

  • Save ragowthaman/0508a741aabb741a90c54e34a6d4b216 to your computer and use it in GitHub Desktop.

Select an option

Save ragowthaman/0508a741aabb741a90c54e34a6d4b216 to your computer and use it in GitHub Desktop.
send SMS from Django app Plivo
import plivo
def send_sms_plivo(to, message):
"""
Send message via plivo service 0.0037 USD/sms; only outgoing
:return:
"""
auth_id = "....."
auth_token="..........."
p = plivo.RestAPI(auth_id, auth_token)
params = {'src': 'countrycodephonenumber', 'method': 'POST', 'dst': 'countrycodephonenumber', 'text': message}
response = p.send_message(params)
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment