Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
app.py
config-sample.env.txt
index.tpl

README.md

RingCentral 3-Legged OAuth Demo in Python

Overview

This is a quick 3-legged OAuth demo that runs using Python 2.7 and Bottle with the RingCentral Python SDK v0.6.1.

Installation

$ git clone https://github.com/ringcentral/ringcentral-demos-oauth
$ pip install bottle
$ pip install python-dotenv
$ pip install requests
$ pip install ringcentral

Configuration

Edit the .env file to add your application key and application secret.

$ cd ringcentral-demos-oauth/python-bottle
$ cp config-sample.env.txt .env
$ vi .env

In the Developer Portal, ensure the redirect URI in your config file has been entered in your app configuration. By default, the URL is set to the following for this demo:

http://localhost:8080/oauth2callback

Usage

Open the web page:

$ python app.py

Go to the URL:

http://localhost:8080

Then click the button to authorize the demo app and view the access token.