Skip to content

controlshift/controlshift-oauth-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9825c24 · Mar 11, 2025

History

14 Commits
Jun 27, 2016
Jun 27, 2016
Jun 27, 2016
Jun 25, 2021
Jun 27, 2016
Mar 11, 2025
Jun 27, 2016
Jun 25, 2020
Jun 27, 2016

Repository files navigation

controlshift-oauth-example

Very, very, simple example code for using OAuth API from ruby

Usage

Use .env.sample as a template for creating a .env file with the appropriate values for your ControlShift application.

bundle install
ruby example.rb

Follow the prompts to convert the authorization code into a token that can be used to consume the API.

If everything is working correctly, should get back a response like this:

{"organisation"=>{"slug"=>"foo", "petitions_count"=>3, "signatures_count"=>4, "blast_emails_count"=>0, "members_count"=>5}}