https://www.titanly.net/api/sms/history/getTextHistory.php
Get Text History
Returns XML of your previously sent text messages. Includes information on if it has been billed or not.
Name | Status | Description |
---|---|---|
ApiKey | Required | Your company Api Key which can be found in the dashboard under account. |
Limit | Optional | This is the number of entries you want to pull right now. Min=1, Max=250, Default=100. |
Page | Optional | This is the current page that you want to pull down. for instance if your Limit is 50 and your page is 3 you will be pulling items 101-150. Min=1, Default=1. |
Base Example
PHP
<?php //Setup Variables $url = "https://www.titanly.net/api/sms/twoFactor/testTwoFactor.php"; $fields['ApiKey'] = urlencode('Your API Key'); $fields['Limit'] = urlencode('Max number of entries'); $fields['Page'] = urlencode('what page of Limit length you are requesting.'); //Turn the $fields array into a POST string. $fieldString = ''; foreach($fields as $key=>$value) { $fieldString .= $key.'='.$value.'&'; } rtrim($fieldString, '&'); // Use Curl To send the reqeust $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldString); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); $userData = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); ?>
Base Payload
Payload
<Root> <response>success</response> <message> </message> <Data> <totalMessages>432</totalMessages> <TextHistory> <id>123</id> <message>the actual message</message> <to>Number that the message was sent to</to> <from>Number the message was sent from</from> <billed>Unix timestamp [0 = unbilled, any number = billed]</billed> <created>Unix timestamp for when the message was sent</created>'; </TextHistory> <TextHistory> <id>123</id> <message>the actual message</message> <to>Number that the message was sent to</to> <from>Number the message was sent from</from> <billed>Unix timestamp [0 = unbilled, any number = billed]</billed> <created>Unix timestamp for when the message was sent</created>'; </TextHistory> </Data> </Root>