I am using this code to get SMS with python 3.7 64
It exceutes but when I try to send an SMS I get nothing,
Any Ideas?
Thanks
from ringcentral import SDK
from multiprocessing import Process
from time import sleep
from ringcentral.subscription import Events
rcsdk = SDK( "yajyakyak", "blahblahxyzpdq", "https://platform.devtest.ringcentral.com")
platform = rcsdk.platform()
platform.login("+13135551211", "101", "blahblah")
def on_message(msg):
print(msg)
def pubnub():
try:
s = rcsdk.create_subscription()
s.add_events(['/account/~/extension/~/message-store/instant?type=SMS'])
s.on(Events.notification, on_message)
res = s.register()
try:
print("Wait for notification...")
except Exception as e:
print (e)
while True:
sleep(0.1)
except KeyboardInterrupt:
print("Pubnub listener stopped...")
p = Process(target=pubnub)
try:
p.start()
except KeyboardInterrupt:
p.terminate()
print("Stopped by User")