Link Search Menu Expand Document

PDF

API Client Libraries

Platform API


Last updated on August 10, 2020

The OAuth realm parameter is in the OAuth specification, but it may be missing in some OAuth client libraries. You must use the realm parameter, or your client cannot do more than retrieve a request token.

To simplify your application integration process with the OpenX Platform API, OpenX provides client libraries with OAuth authentication logic automatically implemented. All OpenX Platform API client libraries support single sign-on (SSO).

The table below lists the available OpenX client libraries.

LanguageComments
PythonYou can download the Python client library from PyPI or by running either of the following commands:

   $ pip install ox3apiclient
   $ pip3 install ox3apiclient

This client library includes the following items:

   • README text file. Explains basic usage, client library installation, and OAuth authentication.
   • init.py script. Can be used as part of your implementation and integration with the OpenX Platform API.
   • Sample python scripts.
PHPYou can download the PHP client library from OpenX’s public GitHub repository. This client library includes the following items:

   • README file. Explains basic usage, client library installation, OAuth authentication, and configuration of the Zend framework.
   • example.php script. Implements the OAuth authentication logic and the PHP client library.
   • Sample PHP scripts. Demonstrates how to create new advertiser and publisher objects.
RubyYou can download the Ruby client library from OpenX’s public GitHub repository. This client library includes the following items:

   • README file. Explains how to implement a helper class for accessing the OpenX Platform API.
   • ox3client.rb file. Implements a class that can login to OpenX SSO, and make OpenX Platform API requests.
   • test.rb file. Provides a short example of how to use OX3APIClient class.
JavaYou can download the Java client library from OpenX’s public GitHub repository. This client library includes the following items:

   • README file. Explains basic usage, client library installation, and OAuth authentication.
   • Demo authentication files.
   • default.properties file.
   • Sample java scripts.

Note: The Java client library is proof of concept code which can be used to obtain a request token. After receiving the request token, you can use your preferred Java HTTP requests client.

API Client Library Features

FeaturePythonPHPRubyJava
OAuth
HTTP DELETE 
HTTP GET
HTTP POST 
HTTP PUT 
Updates  
Cookie persistence