Message-ID: <1247528492.15849.1614958434149.JavaMail.confluence@wiki> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_15848_1759512430.1614958434149" ------=_Part_15848_1759512430.1614958434149 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html getGroups - Java

getGroups - Java

=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20

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

=20
=20
=20
=20
=20
=20
Example
=20
Hashtable<String, String>[] result =3D tmClient.getGroups();
for(Hashtable<String, String> group: result) {
=09System.out.println("Group ID: " + group.get("id"));
=09System.out.println("Group numbers: " + group.get("numbers=
"));
=09System.out.println("Group name: " + group.get("name"=
));
=09System.out.println("Group IS STOP: " + group.get("is_stop=
"));
}
=20
=20
=20
=20
=20
=20
=20

Arguments:

=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20

String name: 

=20
=20
=20
=20

Name of the delivery report to retrieve or 'all' to retrieve all campaig= n/API report data

=20
=20
=20
=20
=20
=20

Returns:

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


=20
=20
=20
=20
Hashtable key Value
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 f= or this account.

is_stop Boolean. Whether the group is a stop group, norm= ally false.
=20
=20
=20
=20
=20
=20

Specific error codes:

=20
=20
=20
=20

None.

=20 =20

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

=20
=20
=20
=20
=20
=20 =20
=20
=20

 

=20
=20
=20
=20

 

=20
=20
=20
------=_Part_15848_1759512430.1614958434149--