Java Quickstart

Complete the steps described in the rest of this page to run a simple Java command-line application that uses the Vault Export API.


  1. Download and install Gradle.
  2. Download the Export API sample app

Setup the working directory

  1. Unzip the sample app into your working directory.
  2. Go to your API Project:

    1. Click Credentials.
    2. Click Create Credentials chevron_right OAuth Client Id.
    3. Click Type—Other.
    4. Enter a name such as Vault API Quickstart.
    5. Click OK.
    6. Click Download JSON to the right of the client ID.
    7. Rename the JSON file to client_secret.json.
    8. Move the JSON file to [working-directory]/src/main/resources, overwriting the existing file.

Run the samples

  1. gradle -q run