Skip to content

Example Flask + Python app for demonstrating how to access Planning Center's API using OAuth2

License

Notifications You must be signed in to change notification settings

planningcenter/pco_api_oauth_example_flask_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCO API OAuth Example - Flask + Python

This is an example Flask app for demonstrating how one might build an app to authenticate any PCO user and then subsequently use that authentication to query the API.

You can learn more about Planning Center's API here.

Setup

  1. Create an app at api.planningcenteronline.com.

    Set the callback URL to be http://localhost:5000/auth/complete.

  2. Install the required packages:

    pip install pipenv
    pipenv install
  3. Set your Application ID and Secret in the environment and run the app:

    export OAUTH_APP_ID=abcdef0123456789abcdef0123456789abcdef012345789abcdef0123456789a
    export OAUTH_SECRET=0123456789abcdef0123456789abcdef012345789abcdef0123456789abcdef0
    export OAUTHLIB_INSECURE_TRANSPORT=1
    pipenv run flask run

    Note: the OAUTHLIB_INSECURE_TRANSPORT environment variable should only be used in development mode when testing locally.

  4. Visit localhost:5000.

Copyright & License

Copyright Ministry Centered Technologies. Licensed MIT.

About

Example Flask + Python app for demonstrating how to access Planning Center's API using OAuth2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •