This command can be used to get a list of inboxes from your Textlocal account.
https://api.txtlocal.com/get_inboxes/
<?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_inboxes/');
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_inboxes/?' . $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->getInboxes();
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_inboxes":3,
"inboxes":[{
"id":10,
"number":60777,
"keyword":"NH3BR",
"num_messages":36,
"num_contacts":0,
"newMsgs":0
},
{
"id":188597,
"number":66777,
"keyword":"CALLMEBACK",
"num_messages":184,
"num_contacts":184,
"newMsgs":3
},
{
"id":208872,
"number":447123456789,
"keyword":null,
"num_messages":667,
"num_contacts":101,
"newMsgs":12
}],
"status":"success"
}<?xml version="1.0" encoding="UTF-8" ?> <response> <num_inboxes>7</num_inboxes> <inboxes> <inbox> <id>10</id> <number>60777</number> <keyword>NH3BR</keyword> <num_messages>36</num_messages> <num_contacts>0</num_contacts> <newMsgs>0</newMsgs> </inbox> <inbox> <id>188597</id> <number>66777</number> <keyword>Company</keyword> <num_messages>184</num_messages> <num_contacts>184</num_contacts> <newMsgs>3</newMsgs> </inbox> <inbox> <id>207822</id> <number>447123456789</number> <keyword></keyword> <num_messages>667</num_messages> <num_contacts>101</num_contacts> <newMsgs>12</newMsgs> </inbox> </inboxes> <status>success</status> </response>