Solved

Gettting Failed to install 'ringcentral_client==0.6.0' in Python 3.7

  • 13 December 2019
  • 5 replies
  • 1011 views

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)

icon

Best answer by Phong1426275020 13 December 2019, 20:25

View original

5 replies

Userlevel 1

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


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

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

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....

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


Reply