Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

msg91 python

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://api.msg91.com/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
Comment

PREVIOUS NEXT
Code Example
Python :: The function to be built, amino_acids, must return a list of a tuple and an integer when given a string of mRNA code. 
Python :: how to check for updates from github in python 
Python :: python enable pyqt errors 
Python :: argparse for Command-Line Interface (CLI) 
Python :: Python stop the whole function 
Python :: how to python string up 
Python :: fonts in python 
Python :: how to connect ip camera to opencv python 
Python :: bst deleting 
Python :: menor valor lista python 
Python :: python order list by multiple index 
Python :: python logging levels 
Python :: dbscan example 
Python :: ope pickle file 
Python :: update matplotlib params 
Python :: how do i get auth user model dynamically in django? 
Python :: python docstrings example 
Python :: convert file dta in csv 
Python :: Adding two lists using map() and Lamda Function 
Python :: Python NumPy transpose Function Syntax 
Python :: jupyter dataframe print all 
Python :: number length python 
Python :: bag of word scikit learn 
Python :: pandas series to dataframe index as column 
Python :: python casting float to int 
Python :: speech to text 
Python :: supress jupyter notebook output 
Python :: binary tree python 
Python :: python generator function 
Python :: not equal to in python 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =