示例#1
0
def drivercode():
    client = SinchSMS('826e4cc7-3f6e-4fa2-a9a6-176ccec744c2',
                      'iDeaWwa6S0yMxrTt4ohqcA==')
    db, conn1 = connector()
    mailid = session_name()
    booked = db.bookedRides
    rides = db.offerride
    activeRides = db.activeRides
    codeValue = session.get('code', None)
    starttime = rides.find_one({'mailid': mailid, 'code': codeValue})
    passengerRides = []
    for document in booked.find({
            'route.mailid': mailid,
            'route.time': starttime['Time']
    }):
        passengerRides.append(document)
    if request.method == 'POST':
        phno = booked.find({'route.mailid': mailid})
        for phno in booked.find({'route.mailid': session_name()}):
            phno1 = phno['route']['phno']
            print(phno1)
            number = '+91' + phno1
            print(number)
        number = '+918237822234'
        message = 'Your Ride has started .'
        print("ABC")
        client.send_message(number, message)
        rides.find_one_and_delete({'code': codeValue})
        return redirect(url_for('insidelogin.profile'))
    return render_template('AfterLogin/congrat.html',
                           code=codeValue,
                           time=starttime['Time'],
                           passengerRides=passengerRides)
示例#2
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    # e0dfdf4e51b248bdbb0b8fbdaa5948e8
    #b1b93f20210d4ca3945eb5a8710f80e3

    number = sys.argv[1]
    app_secret = ''
    app_key = ''

    # enter the message to be sent
    message = 'Hello Message!!!'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#3
0
def sendSMS(number, message): 
  
    # enter all the details 
    # get app_key and app_secret by registering 
    # a app on sinchSMS 
    number = number
    app_key = '3a920ae8bc014bee983b186e809f38ab'
    app_secret = '3cbdc5a58dd04bc2a228cb106ad81acd  '
  
    # enter the message to be sent 
    client = SinchSMS(app_key, app_secret) 
    print("Sending '%s' to %s" % (message, number)) 
  
    response = client.send_message(number, message) 
    message_id = response['messageId'] 
    response = client.check_status(message_id) 
  
    # keep trying unless the status retured is Successful 
    while response['status'] != 'Successful': 
        print(response['status']) 
        time.sleep(1) 
        response = client.check_status(message_id) 
  
    print(response['status']) 
    return response['status']
def sendSMS():
    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '8193293755'
    app_key = 'baf8461b-74c9-402b-badd-83a828820d9c'
    app_secret = 'UNER/xJGN0uM+O3ZA4brOQ=='

    # enter the message to be sent
    message = 'FALERT !! FALL DETECTED IN CAM1 AT TIME: ' + str(
        datetime.datetime.now())

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#5
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '9404152440'
    app_key = '0a9f97ef1efc416094bd7cca5de5b539'
    app_secret = '78885cf86a7a44dca549b49532205def'

    # enter the message to be sent
    message = 'Hello Message!!!'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#6
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '+917908504352'
    app_key = 'c646f3de015f4c83a41edea5ed57e830'
    app_secret = 'ae36d1aa396b4f10950c19f2407276b6'

    # enter the message to be sent
    message = 'Hello Message!!!'
    print("sending sms")

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#7
0
def sendSMS():
    number = 'your_mobile_number'
    app_key = 'your_app_key'
    app_secret = 'your_app_secret'

    # enter the message to be sent
    message = input('Enter Message :')

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])

    if __name__ == "__main__":
        sendSMS()
示例#8
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '+919690503556'
    app_secret = 'P0q02HeH60OMMKokwb/xkw=='
    app_key = '378cb6cd-5655-4108-8172-fd3474fb6e3a'

    # enter the message to be sent
    message = 'Hey Rohit! Someone plugged a usb device in your system'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#9
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '+15519985623'
    app_key = '3d9b663924964d7391b8e0449fd21e4a'
    app_secret = '3d9b663924964d7391b8e0449fd21e4a'
    # enter the message to be sent
    message = 'Hello Message!!!'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#10
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = 'your_mobile_number'
    app_key = 'your_app_key'
    app_secret = 'your_app_secret'

    SMS_SERVER_SINCH_API_KEY = 'c44ef77212934112a20363646cc88d5c'
    SMS_SERVER_SINCH_API_SECRET = '4c44f46fc5294ac4981610233390b79f'
    SMS_SERVER_SINCH_FROM_NUMBER = '35799599819'

    app_key = SMS_SERVER_SINCH_API_KEY
    app_secret = SMS_SERVER_SINCH_API_SECRET

    number = '35799359864'

    # enter the message to be sent
    message = 'Hello Message!!!'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
def sendSMS(ell,yolo,coordinates):
    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    port.write('AT+CMGS="+918437593296"'+'\r\n')
    rcv = port.read(10)
    number = '+918437593296'
    app_key = '23e0f50a-749b-4e91-b567-6b39ca381854'
    app_secret = 'GHgxRvVaNEC9B2J0RXGI+g=='
    results_of_yolo_ell=str(yolo)+" people carrying "+ str(ell)+" number of weapons"

    # enter the message to be sent
    message = " '%s' : I am feeling unsafe at '%s', there are '%s' around me"%(date,location_cords,results_of_yolo_ell)

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#12
0
def sendSMS():

    # enter all the details
    # get app_key and app_secret by registering
    # a app on sinchSMS
    number = '8193293755'
    app_key = 'baf8461b-74c9-402b-badd-83a828820d9c'
    app_secret = 'UNER/xJGN0uM+O3ZA4brOQ=='

    # enter the message to be sent
    message = 'Fall Detected - Patient needs help in room 108'

    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    # keep trying unless the status retured is Successful
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#13
0
        def otp():
            self.email = input('Enter your email Address: ')
            number = input('Enter your mobile number: ')
            while len(number) != 10 and number not in ['7702167946']:
                number = input('Input valid mobile number: ')
            number = '+91' + number
            otp = random.randrange(1000,9999,2)
            otp = str(otp)
            message = f'Book My Cinema never calls you asking for OTP. OTP is confidential. For security reasons, do not share this OTP with anyone. Your OTP is {otp} '
            client = SinchSMS('660367af-18ff-42ca-89d2-8856dcba78dd','fijjTkW5jkuaCARwJlGnKA==')

            print("Sending '%s' to %s" % ('OTP', number))
            response = client.send_message(number, message)
            message_id = response['messageId']

            response = client.check_status(message_id)
            while response['status'] != 'Successful':
                time.sleep(1)
                response = client.check_status(message_id)

            u_otp = input('Enter the 4 digit otp: ')

            while u_otp != otp:
                u_otp = input('Enter valid 4 digit otp!!: ')

            print('OTP matched!!')
示例#14
0
class Dispatcher:

    SN_KEY = None
    SN_SEC = None
    client = None
    
    message_queue = {}
    confirmation_queue = []

    def __init__(self):
        self.SN_KEY = sc.key
        self.SN_SEC = sc.secret
        self.client = SinchSMS(self.SN_KEY, self.SN_SEC)
        threading.Timer(6, self.confirm).start()

    def queue(self, message, number):
        if not number in self.message_queue:
            self.message_queue[number] = [message]
        else:
            if message in self.message_queue[number]:
                raise ValueError("Queueing the same message to a number more than once is not allowed!")
            if message == "":
                raise ValueError("Queueing empty messages is not allowed!")
            self.message_queue[number].append(message)
        return True 
        
    def dispatch(self, callback = None):
        dispatch_count = 0
        for number in self.message_queue:
            grouped_message = ""
            for message in self.message_queue[number]:
                grouped_message += "{0}\n".format(message)
            response = self.client.send_message(number, grouped_message)
            dispatch_count += 1
            message_entity = {
                'receiver': number,
                'text': grouped_message,
                'id': response['messageId'],
                'ttl': 10
            }
            self.confirmation_queue.append(message_entity)
        self.message_queue = {}
        if callback: callback({'dispatched': dispatch_count})
            
    
    def confirm(self):
        unconfirmed = []
        if not self.confirmation_queue == None:
            for msg in self.confirmation_queue:
                status = self.client.check_status(msg['id'])
                if not status == 'Successful':
                    msg['ttl'] -= 1
                    if msg['ttl'] == 0:
                        raise TimeoutError("Could not send message to {nr}! Confirmation timeout\nContent: {text}".format(nr=msg['receiver'], text=msg['text']))
                    unconfirmed.append(msg)
                else:
                    msg['callback']({'receiver': msg['receiver'], 'message': msg['text']})
            self.confirmation_queue = unconfirmed
示例#15
0
def smssend():
    client = SinchSMS(
        XXXXXXXXXXXX, XXXXXXXXXXXXX
    )  #use your userID and password that you can get after creating the account
    number = XXXXXXXXXXXXX  #place the number that you want to send message
    speech("yes i can")
    speech("tell me the message")
    message = speechtotext()
    print('sending message to ' + number)
    response = client.send_message(number, message)
    '''response=response['messages'][0]
示例#16
0
def send_message(e):
    message = '{} crashed with error: {}'.format(settings.user, e)
    client = SinchSMS(settings.app_key, settings.app_secret)
    print("Sending '{}' to {}".format(message, settings.number))
    response = client.send_message(settings.number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)
        print(response['status'])
					def sms_send(number,message):
					    client = SinchSMS('df5a3b30-0728-403f-9ccf-1efa4e570bd7','BLDUeKvHvEWbkcpnLId6AA==')

					    print("Sending '%s' to %s" % (message, number))
					    response = client.send_message(number, message)
					    message_id = response['messageId']

					    response = client.check_status(message_id)
					    while response['status'] != 'Successful':
					        print(response['status'])
					        time.sleep(1)
					        response = client.check_status(message_id)
					        print(response['status'])
def send_sms():
    '''Send an SMS
    '''
    client = SinchSMS(TOKEN, SECRET)
    number = NUMBER
    message = 'Alarm was triggered'

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    while response['status'] != 'Successful':
        sleep(DELAY_ALARM)
        response = client.check_status(message_id)
示例#19
0
def sendSMS(id):
    number = 'mobile_number'
    app_key = 'app key'
    app_secret = 'secret key'
    message = "Hi \n" + str(id) + " is at your door step"
    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))
    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)
    print(response['status'])
    def send_sms():
        # number = '+841626118018'
        number = '+841626630681'
        message = "Alert!"
        client = SinchSMS("ce7ec38a-2ba2-47e8-aaf1-419a59809eca",
                          "75jYmrdsG0aVAFUQu5AlIQ==")
        print("Sending '%s' to %s" % (message, number))
        response = client.send_message(number, message)
        message_id = response['messageId']
        response = client.check_status(message_id)

        while response['status'] != 'Successful':
            print(response['status'])
            time.sleep(1)
            response = client.check_status(message_id)
            print(response['status'])
示例#21
0
def send_sms(message):

    number = '+447904597237'

    client = SinchSMS('0a0cb8f3-829b-4613-b34c-f96ed8a94978',
                      'ATOI/bqb0E2XJaSv1KOQ/Q==')

    print("Sending '%s' to %s" % (message, number))
    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)
    print(response['status'])
示例#22
0
    def sendmessage(self, input):

        self.message = input
        client = SinchSMS(self.app_key, self.app_secret)
        print("Sending '%s' to %s" % (self.message, self.number))

        response = client.send_message(self.number, self.message)
        message_id = response['messageId']
        response = client.check_status(message_id)

        # keep trying unless the status retured is Successful
        while response['status'] != 'Successful':
            print(response['status'])
            # time.sleep(1)
            response = client.check_status(message_id)

        print(response['status'])
示例#23
0
def sendsms():

    number = '+918059710704'
    message = 'New Garbage Detected'

    client = SinchSMS("0ca08f70-4fa2-4547-a9b0-5b1280115d6d",
                      "QKewCNo4oEqXbgwxEglPxA==")

    print("Sending '%s' to %s" % (message, number))
    response = client.send_message(number, message)
    message_id = response['messageId']

    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)
        print(response['status'])
def send_sms():

    title_id = str(title)
    price_value = str(converted_price)
    number = '+yournumber'
    message = title_id + " is available for $ " + price_value + ", buy it now!"
    client = SinchSMS("appkey", "appsecret")

    print("Sending '%s' to %s" % (message, number))
    response = client.send_message(number, message)
    message_id = response['messageId']

    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(5)
        response = client.check_status(message_id)
        print(response['status'])
示例#25
0
def sms(msg):
    number = '+919421701789'
    key = 'd7428c4f-6ac0-4b16-9e7c-299f079b3334'
    secret = 'sVLKck4OJkaFKK8KbCrxgw=='
    client = SinchSMS(key, secret)

    print "here"

    print msg

    response = client.send_message(number, msg)
    message_id = response['MessageId']
    response = client.check_status(message_id)

    while response['Status'] != 'Successful':
        print "Wait..!!"
        time.sleep(1)

    print "!!..Message Send Successfully..!!"
示例#26
0
def sms(msg):
	number='+919421701789'
	key='d7428c4f-6ac0-4b16-9e7c-299f079b3334'
	secret='sVLKck4OJkaFKK8KbCrxgw=='
	client=SinchSMS(key,secret)

	print "here"
	
	print msg
	
	response=client.send_message(number,msg)
	message_id=response['MessageId']
	response=client.check_status(message_id)
	
	while response['Status']!='Successful':
		print "Wait..!!"
		time.sleep(1)

	print "!!..Message Send Successfully..!!"
def send_sms():

    title_id = str(title)
    price_value = str(converted_price)
    number = '+919819826602'
    message = title_id + " is available for $ " + price_value + ", buy it now!"
    client = SinchSMS("38073232-45c4-4b63-b17a-bcb186548d3e",
                      "79lnGDpu2UOeLW95dbX4Ig==")

    print("Sending '%s' to %s" % (message, number))
    response = client.send_message(number, message)
    message_id = response['messageId']

    response = client.check_status(message_id)
    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(5)
        response = client.check_status(message_id)
        print(response['status'])
示例#28
0
def sendSMS(bot_handler: Any, *paraargs) -> str:

    number = paraargs[0][0]
    app_key = '<YOUR API KEY>'
    app_secret = '<YOUR API SECRET>'
    #we are having a lot of bots so send the number of any bot.
    message = "Message sent by a user from bot 1"
    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
示例#29
0
    def send_sms(self):
        """
		TODO : Use twilio/sinch API to actually send sms to mobile phone
		:return:
		"""
        number = '+91' + self.owner.mobile
        message = self.verify_code
        client = SinchSMS('d9abf26d-0ec2-49f3-af2c-17cda14911a4',
                          'C1sG5vRbskaqWB37kUKMPg==')

        print("Sending '%s' to %s" % (message, number))
        response = client.send_message(number, message)
        message_id = response['messageId']
        response = client.check_status(message_id)

        while response['status'] != 'Successful':
            print(response['status'])
            time.sleep(1)
            response = client.check_status(message_id)

        print(response['status'])
示例#30
0
def sendsms(name):
        number='+918940241339'
        #number = '+919524272446'
        #number = '+919159812210'
        #number = '+918667617235'
        message =name +' JUST CROSSED THE CAMERA at ' + str(now)
        #client= SinchSMS('
        client = SinchSMS('28717cde0dc7410fb3c2373b0bdec924','398988aaa43b4b1fa4340eef49097fbe')
        #client = SinchSMS('6a636257-e492-4eb3-b84a-7d45754c3683','qPbCkDBB9USs13fjo3MGuw==')
        #balaji client= SinchSMS('94619236-7c30-49e3-8eb9-bd944ff9dafb','WiLPttLCt0aO13MFrGykFA==')
        print("sending '%s' to %s" % (message,number))
        response = client.send_message(number,message)
        message_id = response['messageId']
        response = client.check_status(message_id)
        while response['status'] != 'successfull':
            print(response['status'])
            time.sleep(1)
            response = client.check_status(message_id)
           # print(response['status'])
            break
        return True
def send_email(user, pwd, recipient, subject, body,Number):
    gmail_user = user
    gmail_pwd = pwd
    FROM = user
    TO = recipient if type(recipient) is list else [recipient]
    SUBJECT = subject
    TEXT = body

    # Prepare actual message
    message = """\From: %s\nTo: %s\nSubject: %s\n\n%s
    """ % (FROM, ", ".join(TO), SUBJECT, TEXT)
    try:
        server = smtplib.SMTP("smtp.gmail.com", 587)
        server.ehlo()
        server.starttls()
        server.login(gmail_user, gmail_pwd)
        server.sendmail(FROM, TO, message)
        server.close()
        print 'successfully sent the mail'
    except:
        print "failed to send mail"
#sms sending
	# import textmagic.client
	# client = textmagic.client.TextMagicClient('your_username', 'your_api_password')
	# result = client.send("Hello, World!", "1234567890")
	# message_id = result['message_id'].keys()[0]
	number = Number
	message = subject
	client = SinchSMS(your_app_key, your_app_secret)
	# print("Sending '%s' to %s" % (message, number))
	response = client.send_message(number, message)
	message_id = response['MessageId']
	response = client.check_status(message_id)
	while response['Status'] != 'Successful':
		#print(response['Status'])
		#time.sleep(1)
		response = client.check_status(message_id)
示例#32
0
def sendSMS(inset):
    # extract message from set
    message = 'updates on aitplacements.com'
    i = 1
    for e in inset:
        news = str(e.encode('utf-8'))
        message = message + "\n" + str(i) + ". " + news
        i = i + 1
    # print message
    client = SinchSMS(app_key, app_secret)
    print("Sending '%s' to %s" % (message, number))

    response = client.send_message(number, message)
    message_id = response['messageId']
    response = client.check_status(message_id)

    while response['status'] != 'Successful':
        print(response['status'])
        time.sleep(1)
        response = client.check_status(message_id)

    print(response['status'])
    global titlelist
    titlelist = list(inset)
示例#33
0
pattern = '<[^>]+>'
def this_html(text):
    return True if len(re.findall(pattern,text)) else False

if sys.argv[1]=='send':
    number = sys.argv[2]

    message=''
    for word in sys.argv[3:]:
        message+=" "
        message+=word
    message=message.strip()

    client = SinchSMS("app_public_key","app_secret_key")
    print("Sending '%s' to %s" % (message, number))
    client.send_message(number, message)
#------------------------------------------------------
if sys.argv[1]=='recive':
    g = Gmail()
    g.login('gmail_login', 'gmail_pass')

# mark the letters without html markup as Normal
    messages = g.inbox().mail()
    for message in messages:
        message.fetch()
        message_body=message.body.split()
        message_body=("".join(message_body)).strip()
        if this_html(message_body)==False:
            message.add_label("Normal")

# all letters marked as Normal
示例#34
0
import time
from sinchsms import SinchSMS
number = '+56953890064'
message = 'I love SMS!'

client = SinchSMS("ed7a15d4-0af0-4c2e-a5ff-ac0904b6aebc", "q4lmt6bL2E62HX4QD4dwwQ==")

print("Sending '%s' to %s" % (message, number))
response = client.send_message(number, message)
message_id = response['messageId']

response = client.check_status(message_id)
while response['status'] != 'Successful':
    print(response['status'])
    time.sleep(1)
    response = client.check_status(message_id)
print(response['status'])