Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Get a list of available 'send' groups, including 'merge' groups - pre-defined groups containing a list of mobile numbers to send a message to.
Also lists 'stop' groups - numbers in these groups will never be sent messages. Every account has at least one stop group, so that your recipients can always opt out of receiving messages from you. This is a legal requirement.

Code Block
themeRDark
languagejava
titleExample
linenumberstrue
Hashtable<String, String>[] result = tmClient.getGroups();
for(Hashtable<String, String> group: result) {
	System.out.println("Group ID: " + group.get("id"));
	System.out.println("Group numbers: " + group.get("numbers"));
	System.out.println("Group name: " + group.get("name"));
	System.out.println("Group IS STOP: " + group.get("is_stop"));
}

Arguments:

 

String name: 

Name of the delivery report to retrieve or 'all' to retrieve all campaign/API report data

Returns:

an array of Hashtable, each group represented by a Hashtable. Each Hashtable has 4 keys: 'is_stop', 'id', 'numbers' and 'name' e.g. name of the first returned group is
group.get("name") each Hashtable has 4 keys:


Hashtable keyValue
name

String. The name of the group.

quantity 

Integer. The quantity of numbers in the group.

id 

Integer. The unique ID of the group, unique for this account.

is_stopBoolean. Whether the group is a stop group, normally false.

Specific error codes:

None.

Note

error code 400 is reported if the keyword name is not specified. See General error codes.

Panel
title
  • Next
Panel
titleAll Functions
Panel
titleDownload