Obtaining group and folder IDs from Eloqua 10

Obtaining group and folder IDs from Eloqua 10.

In my last post I showed how to send emails using the Eloqua 10 REST API. Part of the process required you to know the group and folder IDs for where you wanted to store the emails as they’re created, and which group you wanted to put them into.

Only a couple of lines of code are required, so first of all lets initialise our connection to the API.

$site = YOUR COMPANY NAME
$user = USERNAME
$password = PASSWORD
$baseUrl = "https://secure.eloqua.com/API/REST/1.0";
$eloquaRequest = new EloquaRequest($site, $user, $password, $baseUrl);

To get a list of all the folder IDs :

$response = $EloquaRequest->get('assets/email/folders?search=*&page=1&depth=complete&orderBy=createdAt%20desc');
print_r($response);

To get a list of all the group IDs :

$response = $EloquaRequest->get('assets/email/groups?search=*&page=1&depth=complete&orderBy=createdAt%20desc');
print_r($response);

That’s it! It was easier to find them out in Eloqua 9 but this makes a handy bookmark going forward with API development in E10.