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
Gettting Failed to install 'ringcentral_client==0.6.0' in Python 3.7
Tags: rest api
Dec 13, 2019 at 10:41am   •   5 replies  •  0 likes
Rick Smith

Hello all


Have the following code its Python 3.7 When I try to import ring_central client I get Any ideas?


Thanks

----- Failed to install 'ringcentral_client==0.6.0' -----

The code I have so far...

import time
import json
import os
from ringcentral_client import PubNub
from ringcentral import SDK
from ringcentral_client import RestClient, SANDBOX_SERVER
#DO NOT MODIFY ANY OF THIS OR IT WILL BLOW UP IN YOUR FACE
rc= RestClient("blahbla", "other","https://platform.devtest.ringcentral.com")
rc.authorize('+1XXXXXXX, ''', 'mypasword')

ringout_body = {
"to": {"phoneNumber": 'number'},
"from": {"phoneNumber": 'othernumber'},
"callerId": {"phoneNumber": 'id'},
"playPrompt": "true"
}

response = rc.post('/restapi/v1.0/account/~/extension/~/ring-out',ringout_body)

5 Answers
answered on Dec 17, 2019 at 5:55am  

Hello All:

Still unable to get the ringout code to work, has anybody gotten it to work in python or C#?, However, I did get SMS to work and was able to send a text message as an experiment.


My real goal is to be able to receive or read and an incoming call and then perform various actions...Is this possible? I am fairly certain I can do this with SMS, but not to clear on voice?


Thanks for any help



 0
answered on Dec 13, 2019 at 1:28pm  

Ok, I tried the code and I am getting

Invalid resource owner credentials

I believe it's a phone number that's the user name at least tha's what I had before, or it could be the password...Not sure.

at

  • platform.login("USERNAME", "EXTENSION", "PASSWORD")

 0
answered on Dec 13, 2019 at 11:25am  

Where do you get the ringcentral_client? Is that your own lib?

To use the RingCentral Python SDK, here is all you need to do:

from ringcentral import SDK

rcsdk = SDK( "CLIENTID", "CLIENTSECRET", "RINGCENTRAL_SERVER_URL")
platform = rcsdk.platform()
platform.login("USERNAME", "EXTENSION", "PASSWORD")

resp = platform.post('/restapi/v1.0/account/~/extension/~/ring-out',
              {
                  'from' : { 'phoneNumber': 'othernumber' },
                  'to'   : {'phoneNumber': 'number' },
                  'callerId': {'phoneNumber': 'id'},
                  'playPrompt' : False
              })
print "Call placed. Call status: " + resp.json().status.callStatus



 1
answered on Dec 13, 2019 at 1:06pm  

Thanks!

I believe it came from Ring Central, It's older code so I'm not sure.


Anyway I will try as you suggest.


Thanks Again


 0
answered on Dec 14, 2019 at 8:17am  

Thanks,

I checked as far as I can tell, it's correct, now it's throwing "unauthorized for this grant type" at platform.login. I tried enabling every type of grant??? I could still nothing....


 0



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