private String importAlbum(PhotoAlbum album, TokensAndUrlAuthData authData) throws IOException {
    String description = album.getDescription();

    Request.Builder requestBuilder = new Request.Builder().url(CREATE_ALBUM_URL);
    requestBuilder.header("Authorization", "Bearer " + authData.getAccessToken());

    FormBody.Builder builder = new FormBody.Builder().add("title", album.getName());
    if (!Strings.isNullOrEmpty(description)) {
      builder.add("description", description);
    }
    RequestBody formBody = builder.build();
    requestBuilder.post(formBody);

    Response response = client.newCall(requestBuilder.build()).execute();
    int code = response.code();
    Preconditions.checkArgument(
        code >= 200 && code <= 299,
        String.format(
            "Error occurred in request for %s, code: %s, message: %s",
            CREATE_ALBUM_URL, code, response.message()));
    ResponseBody body = response.body();
    Preconditions.checkArgument(body != null, "Didn't get response body!");
    Map<String, Object> responseData = objectMapper.readValue(body.bytes(), Map.class);

    String newAlbumId = (String) ((Map<String, Object>) responseData.get("data")).get("id");
    if (Strings.isNullOrEmpty(newAlbumId)) {
      throw new IOException("Didn't receive new album id");
    }

    return newAlbumId;
  }
Imports albums and photos to Imgur
extensions/data-transfer/portability-data-transfer-imgur/src/main/java/org/datatransferproject/datatransfer/imgur/photos/ImgurPhotosImporter.java