I am newbie to ExactTarget app development. I'm trying to build an app using Java SDK but I couldn't find any sample code to begin with. Can anyone provide me sample Java code for ExactTarget app development?

  • Hi Manoj.Can you provide more details on what you are trying to do? -ian May 1 '14 at 12:25
  • @IanMurdock I have requirement to build an app for a company some thing like inventory ...Since im very new to this ET development and i Know oly java...I dont know from where to begin ...thts y i need help from some ultra ET specialist like you :-) May 2 '14 at 10:10

It depends on what you are trying to do. In general, to use the SDK, you need to get a client ID and secret from App Center on Code@ExactTarget, instantiate an ETClient object with that client ID and secret, then use that instance as the authentication context for future interactions. For example, here is how you retrieve a data extension and add a row to it:

// specifiy client ID and secret
ETConfiguration configuration = new ETConfiguration();

// instantiate ETClient object
ETClient client = new ETClient(configuration);

// retrieve the data extension "products"
ETFilter filter = new ETSimpleFilter("Name",
ETDataExtension dataExtension = client.retrieveDataExtension(filter);

// add a row to the data extension "products"
ETDataExtensionRow row = new ETDataExtensionRow();
row.setColumn("id", "123");
row.setColumn("name", "My Great Product");
row.setColumn("price", "42.00");

As Ivan mentions, you can also use the raw API in Java as well.


Not the answer you're looking for? Browse other questions tagged or ask your own question.