How to use the ox3apiclient.OX3APIClient function in ox3apiclient

To help you get started, we’ve selected a few ox3apiclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openx / OX3-Python-API-Client / example.py View on Github external
import datetime
import ox3apiclient

# User credentials
email_address = '' 
password = ''

# OAuth credentials. These will be supplied by your Account Manager or Support.
domain = ''
realm = ''
consumer_key = ''
consumer_secret = ''


ox = ox3apiclient.OX3APIClient(domain, realm, consumer_key, consumer_secret)

# Step 1. Fetch temporary request token.
ox.fetch_request_token()

# Step 2. Log in to SSO server and authorize token.
ox.authorize_token(email_address, password)

# Step 3. Swap temporary request token for permanent access token.
# If you need to store the access token yourself you can do so with something
# similar to:
#   token_str = ox.fetch_access_token()
#   access_token = urlparse.parse_qs(token_str)['oauth_token'][0]
ox.fetch_access_token()

# Step 4. Validate your access token.
# You'll more than likely want to call the validate_session method, but you can

ox3apiclient

Client to connect to the OpenX Enterprise API.

BSD-2-Clause
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis