SMS
Contacts
Appointments

Send Two Factor

The first part of the 2-Factor Authentication process. After calling this API page you will need to present the user with a form to fill out, in order to gather then code from them and then call the testTwoFactor.php API page.
https://www.titanly.net/api/twoFactor/sendTwoFactor.php
Name Status Description
ApiKey Required Your company API Key which can be found in the dashboard under account.
Number Required This is the phone number you want to send the code to.
ExternalId Required This is any unique variable you want to associate with this unique instance of 2-Factor Authentication.
Base Example
PHP
<?php
	//Setup Variables
	$url = "https://www.titanly.net/api/sms/twoFactor/sendTwoFactor.php";
	$fields['ApiKey'] = urlencode('Your API Key');
	$fields['Number'] = urlencode('ID of the number to be released');
	$fields['ExternalId'] = urlencode('Unique ID from your system to reference this instance.');

	//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>
		
	</Data>
</Root>