JGett is a Client API implementation for ( service.

Thru the client class it is possible to manage, upload and download files to the system to share them into the web.


This library is built with Maven and it can be downloaded from the Central Maven Repository.

To do so, you have to include a dependency into your pom.xml:


If you do not use Maven you could download the latest version of JGett here. If you choose to download it manually, please check the Requirement section in order to download the libraries that JGett requires.


To manage, upload and download file with system you will use a JGettClient instance.

With this object you can handle all the possibilities that the Rest API offers.

Connection initialization and User authentication

To connect to and authenticate a user you use this code:

String apiKey = "yourApiKey";
String userName = " username";
String password = " password";

JGettClient client = new JGettClient();
client.authenticate(apiKey, userName, password);

once your authentication is successful, you could manage your shares thru the client methods.

Obtaining user and storage information

To obtain information about a account you use this code

UserInfo me = client.getUserInformation();
System.out.println("User email" + me.getEMail());
System.out.println("Available size: " + me.getStorageInfo().getLimitSpace());

which provide a UserInfo instance with information about user and a StorageInfo instance with the information about the size used and available for this account

Managing a Share

A Share in is a collection of files.

The client can create, destroy and retrieve shares. The information about a share is contained in a ShareInfo instance:

ShareInfo si = client.createShare("The Test"); // Create a share named "The Test";
si = client.getShare("The Test"); // Search for a share named "The test"
List<ShareInfo> shares = client.getShares(); // Retrieve all the shares that belongs to this users
client.updateShare(si, "The new Test"); // Rename the share
client.destroyShare(si); // Delete the share "The new test" and all the files that belongs to this share

A share basically has a set of information, which can be retrieved with these methods:

ShareInfo si = client.getShare("The Test");
si.getUrl();  // The URL on the System used to display the share

Managing files

The client can upload, download and remove a file from a share. The information about a file is contained in a FileInfo instance:

File file = new File();
FileInfo fi = client.uploadFile(file);                  // Overloaded method that creates an anonymous share and upload the file to it
byte[] data = client.getFileData();                     // Retrieve file from system
fi = client.getFile(fi.getShare(), fi.getFileId());     // Search for a specific file into system
client.destroyFile(fi);                                 // Delete the selected file

A file also has a set of information, which can be retrieved with these methods:

FileInfo fi = client.getFile(client.getShare("Test"), "0");
fi.getUrl(); // The URL on the System used to download the file thru web interface


JGett is built upon:

All this dependencies are handled by Maven by default. If you want to use JGett without Maven support, please download this libraries manually.

Build the code

The build mechanism is entirely managed by Maven.

There is only a caveat to build this package. During the test phase, it is mandatory to use a valid account to test the client. In order to pass to the test suite the credential you have to write a testng.xml file into the src/test/resources folder crafted in that way:

<!DOCTYPE suite SYSTEM "" >

<suite name="All" verbose="1">
    <parameter name="gettApiKey" value=" api key" />
    <parameter name="gettEmail" value=" email" />
    <parameter name="gettPassword" value=" password" />
    <parameter name="gettPasswordWrong" value="76" />

    <test name="All">
            <package name="it.atcetera.jgett" />

This file is used by TestNG to supply the parameters to the test suite.


JGett is distributed under the LGPL v.3.0 license.