This command will retrieve a list of all scheduled messages.
https://api.textlocal.in/get_scheduled/
<?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.textlocal.in/get_scheduled/'); 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.textlocal.in/get_scheduled/?' . $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->getScheduledMessages(); 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. |
{ "scheduled":[{ "id":"136150216", "scheduledFor":"2013-10-02-16-00-00", "howmany":"6", "message":"This is your message", "origin":"YourName", "groupName":"Customers", "groupid":"189455" }, { "id":"136150403", "scheduledFor":"2013-10-02-18-30-00", "howmany":"10", "message":"This is a message sent later in the day", "origin":"YourName", "groupName":"Staff", "groupid":"189456" }] }
<?xml version="1.0" encoding="UTF-8" ?> <response> <scheduled> <schedule> <id>136150216</id> <scheduledFor>2013-10-02-16-00-00</scheduledFor> <howmany>6</howmany> <message>This is your message</message> <origin>YourName</message> <groupName>Customers</groupName> <groupid>189455</groupid> </schedule> <schedule> <id>136150403</id> <scheduledFor>2013-10-02-18-30-00</scheduledFor> <howmany>10</howmany> <message>This is a message sent later in the day</message> <origin>YourName</message> <groupName>Staff</groupName> <groupid>189456</groupid> </schedule> </scheduled> <status>success</status> </response>
Error Codes | |
52 | No scheduled messages found. |
---|