Skip to content

Instantly share code, notes, and snippets.

@tylerreinhart
Created April 15, 2014 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerreinhart/10781282 to your computer and use it in GitHub Desktop.
Save tylerreinhart/10781282 to your computer and use it in GitHub Desktop.
Toopher Ptyhon Example
import toopher
# Create an API object using your credentials
api = toopher.ToopherApi("<your consumer="" key="">", "<your consumer="" secret="">")
# Step 1 - Pair with their phone's Toopher app
pairing_status = api.pair("pairing phrase", "username@yourservice.com")
# Step 2 - Authenticate a log in
auth = api.authenticate(pairing_status.id, "my computer")
# Once they've responded you can then check the status
auth_status = api.get_authentication_status(auth.id)
if (auth_status.pending == false and auth_status.granted == true):
# Success!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment