This command can be used to get a detailed list of contact groups.
https://api.txtlocal.com/get_groups/
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Prepare data for POST request
$data = array('apikey' => $apiKey);
// Send the POST request with cURL
$ch = curl_init('https://api.txtlocal.com/get_groups/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?><?php
// Account details
$apiKey = urlencode('Your apiKey');
// Prepare data for POST request
$data = $apiKey;
// Send the GET request with cURL
$ch = curl_init('https://api.txtlocal.com/get_groups/?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?><?php
require('Textlocal.class.php');
$Textlocal = new Textlocal(false, false, 'your apiKey');
$response = $Textlocal->getGroups();
print_r($response);
?>| There are no additional parameters for this command | |
| Login Parameters (Additional Information) | |
| apiKey | You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. |
{
"num_groups":3,
"groups":[{
"id":"236539",
"name":"Customers",
"size":"12800"
},
{
"id":"187865",
"name":"Staff",
"size":"24"
},
{
"id":"189405",
"name":"Directors",
"size":"4"
}],
"status":"success"
}<?xml version="1.0" encoding="UTF-8" ?> <response> <num_groups>3</num_groups> <groups> <group> <id>236539</id> <name>Customers</name> <size>12800</size> </group> <group> <id>187865</id> <name>Staff</name> <size>24</size> </group> <group> <id>189405</id> <name>Directors</name> <size>4</size> </group> </groups> <status>success</status> </response>