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
Glip Bot with Python
Tags: sdk
Feb 6, 2018 at 3:19pm   •   3 replies  •  0 likes
mg8729

Hello,


I trying to setup a bot using Python, but it doesn't seems like the Python SDK has the same methods as the JS SDK.


For example, with the JS SDK, it seems possible to do something like:


rcsdk = new RC({ server: RINGCENTRAL_ENV, appKey: CLIENT_ID, appSecret: CLIENT_SECRET});

platform.login({ code : req.query.code, redirectUri : REDIRECT_HOST + '/oauth' });


Taken from https://github.com/pkvenu/developing-locally-with-Glip/blob/master/app.js


But, in the Python SDK, the login method of the Platform class only takes username and password.


Reference: https://github.com/ringcentral/ringcentral-python/blob/master/ringcentral/platform/platform.py


It doesn't seem like there's a way to do something equivalent with the 'Python SDK' after adding the app/Bot to Glip to finally get the permanent token?



3 Answers
answered on Feb 6, 2018 at 5:57pm  
An authorization code demo app using the official ringcentral-python SDK is available here:

https://github.com/ringcentral/ringcentral-demos-oauth/tree/master/python-bottle

 0
answered on Feb 6, 2018 at 4:58pm  
And there is a way to get a permanent token without writing any code: https://github.com/tylerlong/ringcentral-token-generator

As long as you get the token, you can set the token to the Python SDK. Thus you can skip the authorization step (because you've already got the token).

 1
answered on Feb 6, 2018 at 4:56pm  
I checked the code of the official Python SDK, it doesn't support authorization code flow. I created an GitHub issue: https://github.com/ringcentral/ringcentral-python/issues/14

You can use this unofficial SDK instead: https://github.com/tylerlong/ringcentral-python It does support authorization code flow: https://github.com/tylerlong/ringcentral-python#step-4-authorize

 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