News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
pubnub to recieving SMS
Tags: sms, pubnub
Oct 1, 2020 at 7:45am   •   1 replies  •  0 likes
Rick Smith

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")


1 Answer
answered on Oct 1, 2020 at 8:34am  

You sent SMS messages to the phone number +13135551211? Is that the main company number? Does the number belong to extension 101? Could you login the RingCentral softphone with 101 extension to see if you receive the SMS message?


 0
on Oct 1, 2020 at 8:43am   •  0 likes

As far as I know, It does. I am not using the SoftPhone, but the number seems to work fine for sending SMS. So I am assuming it does.

on Oct 1, 2020 at 9:22am   •  0 likes

Don't assume, just verify! The code has been tested and I have not seen any other report that it does not work.

on Oct 1, 2020 at 10:01am   •  0 likes

Ok, it's telling me the password and phone number don't match now.



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us