def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if(str(token) == expected_token): client = Client(login='******', password='******') res=client.send_message('919787125779', 'msg') else: client = Client(login='******', password='******') res=client.send_message('919787125779', 'msg') #res = 'Unauthorized' return str(res)
def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if(str(token) == expected_token): client = Client(login='******', password='******') res = client.send_message('212650382336', 'Hi there') else: res = 'Unauthorized' return str(res)
def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if(str(token) == expected_token): client = Client(login='******', password='******') res = client.send_message(to, msg) else: res = 'Unauthorized' return str(res)
def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if (str(token) == expected_token): client = Client(login='******', password='******') res = client.send_message('212669976775', 'Hi there') else: res = 'Unauthorized' return str(res)
def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if(str(token) == expected_token): client = Client(login='******', password='******'') res = client.send_message(to, msg) else: res = 'Unauthorized' return str(res)
def sendmsg(): to = request.args.get('to') msg = request.args.get('msg') token = request.args.get('token') if (str(token) == expected_token): client = Client(login='******', password='******') res = client.send_message(to, msg) else: res = 'Unauthorized' return str(res)
def sendmsg(): #to = request.args.get('to') #msg = request.args.get('msg') token = 'sb' #request.args.get('token') if (str(token) != 'a'): client = Client(login='******', password='******') res = client.send_message('*****@*****.**', 'test') else: res = 'Unauthorized' return str(res)
def sendmsg(): #to = request.args.get('to') to = '8376966864' # msg = request.args.get('msg') msg = 'Hellow world!!!' # token = request.args.get('token') token = 'jmdmatadi' if(str(token) == expected_token): client = Client(login='******', password='******') res = client.send_message(to, msg) else: res = 'Unauthorized' return str(res)
def sendmsg(): res = '' to = request.args.get('to') res += to + '/' msg = request.args.get('msg') res += msg + '/' if (str(token) == expected_token): client = Client(login='******', password='******') res += str(client.send_message(to, msg)) else: res = 'Unauthorized' return res
from whatsapp import Client import time #import yowstack #from layer import echolayer phone_to = '918124766178' client = Client(login='******', password='******') #receive = YowStack() while True: msg = raw_input(">>> ") client.send_message(phone_to, msg) time.sleep(1) #rec = receive.receive(data) #print rec #print 'sending image' #client.send_media(phone_to, path='F://Camera//Sri.jpg') #print 'image sent' #break #rec = Echolayer.Onreceipt(msg,phone_to) #print rec
from whatsapp import Client import base64 phone_to = "919715874993" pwd = base64.b64encode("G1ZAzb/C4maCXBKY4hAEYoeIJW8=") print pwd client = Client('918124572345', pwd) client.send_message(phone_to, 'Hello BR') #client.send_media(phone_to, path='/Users/tax/Desktop/logo.jpg')