Skip to content

Instantly share code, notes, and snippets.

@wehub
Last active June 19, 2017 22:04
Show Gist options
  • Select an option

  • Save wehub/a391c8ff1695386afe8909f2e6755822 to your computer and use it in GitHub Desktop.

Select an option

Save wehub/a391c8ff1695386afe8909f2e6755822 to your computer and use it in GitHub Desktop.
# WePay Python SDK - http://git.io/v7Y1jA
from wepay import WePay
# oauth2 parameters
code = '52sdga231sddd213jj9a'; # the code parameter from step 2
redirect_uri = "http://www.example.com/oauth2_redirect_uri"; # this is the redirect_uri you used in step 1
# application settings
client_id = 123456789
client_secret = '1a3b5c7d9'
production = False
# set production to True for live environments
wepay = WePay(production, None)
# create an account for a user
response = wepay.get_token(redirect_uri, client_id, client_secret, code)
# display the response
print response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment