This is an example Sinatra app for demonstrating how one might build an app to authenticate any PCO user and then subsequently use that authentication to query the API using pco_api.
You can learn more about Planning Center's API here.
-
Create an app at api.planningcenteronline.com.
Set the callback URL to be
https://localhost:4567/auth/complete
. -
Install the required gems:
bundle install
-
Set your Application ID and Secret in the environment and run the app:
export OAUTH_APP_ID=abcdef0123456789abcdef0123456789abcdef012345789abcdef0123456789a export OAUTH_SECRET=0123456789abcdef0123456789abcdef012345789abcdef0123456789abcdef0 export SESSION_SECRET=some-secret-phrase-for-session-cookie-encryption ruby app.rb
-
Visit localhost:4567.
Copyright Ministry Centered Technologies. Licensed MIT.