Configure the Client
Using the Java SDK
Configure the Client (back to all tutorials)
The com.veriplace.client.Client class provides the main entry point to the Java SDK. Before doing anything with the Veriplace API, you will need to instantiate an instance of Client using your application's OAuth credentials. See Step 3 in the Getting Started: Create Your First Application tutorial if you don't yet have OAuth credentials for your application.
-
Option 1: Manually set your credentials
You can instantiate a Client manually by entering your OAuth Consumer Key and Consumer Secret:
If you intend to use one of the Veriplace API calls that require the Application Token, you can provide it as well:
-
Option 2: Use a Properties file
Most applications will want to externalize credentials. com.veriplace.client.factory.DefaultClientFactory supports saving these credentials in a Properties object, which can be loaded from an external file:
A complete list of available configuration properties can be found in the class documentation for DefaultClientFactory.
-
Option 3: Define a ClientFactory
If you wish to configure a Client through some other mechanism, for example, by loading credentials from a database, you can implement your own version of com.veriplace.client.factory.ClientFactory. This is particularly useful in conjuction with the Verplace web framework.