Skip to content

seanrose/box-oauth2-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

box-oauth2-example

A simple app showing how to use OAuth2 with Box. Designed for use with Heroku, though you can obviously host it however you like.

You can see an example here.

Pre-Setup

Before you can do anything with the Box API, you need to register to get a Client ID and Client Secret to make API calls with.

Box Developers

Setup

First create a virtual environment, and activate it

>>> virtualenv venv --distribute
>>> source venv/bin/activate

Install all dependencies with pip

>>> pip install -r requirements.txt

Create an instance on Heroku

>>> heroku create

Set environment variables for the client id and client secret so that your app can make API calls to Box (replace with your own id/secret)

>>> heroku config:add BOX_CLIENT_ID={your client id} BOX_CLIENT_SECRET={your client secret}

Push to Heroku with git

>>> git add .
>>> git commit -m 'init'
>>> git push heroku master

Start up a dyno on Heroku

>>> heroku ps:scale web=1

Go to your newly launched app!

>>> heroku open

About

A simple app showing how to use OAuth2 with Box

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages