Created
June 11, 2019 15:04
-
-
Save aaronbassett/954ecc519ee93d510cdf6be05201da96 to your computer and use it in GitHub Desktop.
Python Glasgow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic send | |
response = client.send_message({'from':NEXMO, 'to':ME, 'text':'Merry Christmas'}) | |
response['messages'][0]['status'] | |
# Send as my dad | |
response = client.send_message({'from':os.environ['DADS_NUMBER'], 'to':ME, 'text':'I\'m proud of you'}) | |
response['messages'][0]['status'] | |
# Send as Python Glasgow | |
response = client.send_message({'from':'PyGlasgow', 'to':ME, 'text':'Hello!'}) | |
response['messages'][0]['status'] | |
# Number insight on my number | |
insight = client.get_advanced_number_insight(number=ME) | |
insight['roaming'], insight['current_carrier'] | |
insight = client.get_advanced_number_insight(number=os.environ['STEVES_NUMBER'], cnam=True) | |
insight['caller_name'] | |
# Send as O2 | |
response = client.send_message({'from': 'O2_', 'to': ME, 'text': 'Spear Phising Message'}) | |
response['messages'][0]['message-price'] | |
# Voicemail | |
response = client.send_message({"from": NEXMO, "to": ME, "type": "binary", "udh": "0401028099", "body": ""}) | |
response['messages'][0]['status'] | |
response = client.send_message({"from": NEXMO, "to": ME, "type": "binary", "udh": "0401028000", "body": ""}) | |
response['messages'][0]['status'] | |
# Flash Messages | |
response = client.send_message({"from": 'Nexmo', "to": ME, "text": "Hello!", "message-class": "0",}) | |
response['messages'][0]['status'] | |
# Flash Message without body | |
Silent tracking messages | |
# Changing Message | |
# https://www.browserling.com/tools/text-to-hex | |
response = client.send_message({"from": NEXMO, "to": ME, "type": "binary", "udh": "050003CC0101", "body": "".replace(" ", ""), "protocol-id": "65"}) | |
response['messages'][0]['status'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment