SMS
Contacts
Appointments

Test Two factor

This is the 2nd part of the 2-Factor Authentication process. This step should come after sendTwoFactor.php, and also after you have gathered the code via a from on your site from the user. 
https://www.titanly.net/api/twoFactor/testTwoFactor.php
Name Status Description
ApiKey Required Your company API Key which can be found in the dashboard under account.
ExternalId Required This ID is the Unique ID that you sent to sendTwoFactor.php , These IDs must match.
Code Required This code is the code that was sent by sendTwoFactor.php to the user. You should have received this back from the user via a from.
Base Example
PHP
<?php
	//Setup Variables
	$url = "https://www.titanly.net/api/sms/twoFactor/testTwoFactor.php";
	$fields['ApiKey'] = urlencode('Your API Key');
	$fields['Code'] = urlencode('Code that was texted to your user');
	$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>