Python Sample Code Send SMS

Code :

import urllib # Python URL functions
import urllib2 # Python URL functions

authkey = "YourAuthKey" # Your authentication key.

mobiles = "9999999999" # Multiple mobiles numbers separated by comma.

message = "Test message" # Your message to send.

sender = "112233" # Sender ID,While using route4 sender id should be 6 characters long.

route = "default" # Define route

# Prepare you post parameters
values = {
          'authkey' : authkey,
          'mobiles' : mobiles,
          'message' : message,
          'sender' : sender,
          'route' : route
          }


url = "http://priority.muzztech.in/api/sendhttp.php" # API URL

postdata = urllib.urlencode(values) # URL encoding the data here.

req = urllib2.Request(url, postdata)

response = urllib2.urlopen(req)

output = response.read() # Get Response

print output # Print Response
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

0