Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Java client library for the Globus Online Transfer API



Bouncy Castle

BCTransferAPIClient (and subclasses) require bouncy castle; download the latest bcprov jar for your JDK release:

and place it in a lib sub directory. The "ext" version with the IDEA algorithm is not required. Tested with jdk16 versions 145 and 146.

For example:

mkdir -p lib
cd lib

Ant or Maven

Required to build the code. Maven can also be used to automatically fetch dependencies (currently just Bouncy Castle).



Run ant in the project root. It will compile the source and create build/jar/TransferAPIClient.jar.


You can also build this project via maven, as usual, just run:

mvn clean install

Example Run

The example programs exercises various parts of the API including transferring a dot file between the tutorial endpoints and creating and then deleting an endpoint. All users have access to the tutorial endpoints (subject to a small quota), so it should work for any GO user.

There are two versions - one using X509 authentication and another using Goauth; both execute the same API commands after authenticating.

X509 Authentication

Using a certificate fetched with myproxy-logon for local user with id 1000:


java -cp lib/bcprov-jdk16-146.jar:build/jar/TransferAPIClient.jar \
    org.globusonline.transfer.Example $GO_USERNAME "$USER_CERT" "$USER_KEY"

For this to work the certificate must be signed by a trusted grid CA and associated with your GO account.


GoAuth access tokens must be acquired from the Globus Nexus API. For testing, the simplest method is to use a command line tool like curl or wget. Here's an example using curl, which will prompt for your GO password:


curl --user $GO_USERNAME ''

The Nexus sample library also has a method for getting client credentials: see

The result is JSON:

{"scopes": [""],
 "access_token_hash": "7363...",
 "issued_on": 1355175114,
 "expiry": 1386711114,
 "token_type": "Bearer",
 "client_id": "GO_USERNAME",
 "lifetime": 31536000,
 "access_token": "un=GO_USERNAME|tokenid=...",
 "expires_in": 31536000,
 "token_id": "04a117a...",
 "user_name": "GO_USERNAME"}

What you need to pass to the Java Transfer client is just the value of the access_token field. Note that the access token format my change in the future, so it should be treated as an opaque string.

The access token obtained this way (client_credentials option) has a long lifetime, and must be kept private just like your password. One method is to store it in a text file with read/write permission only by the owner (or better yet in an encrypted filesystem or subdirectory). Care should also be taken to avoid putting it in your shell history as well. For example in bash:

ACCESS_TOKEN=$(cat /path/to/access_token_text_file)

java -cp lib/bcprov-jdk16-146.jar:build/jar/TransferAPIClient.jar \
    org.globusonline.transfer.GoauthExample $GO_USERNAME \

History will store the commands before variable and subcommand expansion, so it will not include the token value.



  • Add InCommon CA and simplify CA handling
  • Remove CA file arg from Example and GoauthExample


  • Add CA files as resource
  • Support delegate_proxy activation
  • Add some high level methods to JSON client
  • Fix for thread-safety issue
  • Remove unmaintained XML support
  • Add goauth support
Something went wrong with that request. Please try again.