Versions Compared

Key

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

 

Shows the details of a group. Only gets the details of one group at a time, and includes all the numbers in the group, if there are any.
Also lists the numbers in a '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
languagephp
titleExample
linenumberstrue
$result = $tmClient->getGroup('My Group');
echo "Numbers in group: {$result['numbers']}<br/>\n";
foreach ($result['number'] as $number)
	echo "$number <br/>\n";

Arguments:

 

string/integer $group:

Group name (string) or group ID (integer) to get the details of.

Returns:

an array with 5 keys: 'name', 'numbers', 'id', 'is_stop' and 'number'


Array keyValue
nameString. The name of the group just created.
numbers

DEPRECATED – do not use.

quantity

Integer. The quantity of numbers in the group.

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

Boolean. Whether the new group is a stop group. Always false.

number

Array. Array of strings – the numbers in the group, in international format, e.g. 447000000000.

Specific error codes:

None.

Note

error code 404 is reported if the group does not exist; error code 400 is reported if the group name was not specified. See General error codes.

 

 

Panel
title
  • Next
Panel
titleAll Functions
Panel
titleDownload

 

 

Warning
titleYou must know!

Our example code is an illustration of how you might integrate with our systems and is not certified for production environments. You are responsible for testing and QA.