Home
2-Factor Authentication

Using OneTouch to Build a Push Notification Verification

Start a secure & user-friendly authentication on a mobile device via push notifications. This can also secure in-app transactions such as money transfers.

# # $TFA_API_KEY is the tfa API Key
# # $TFA_API_FORMAT is either “xml” or “json”
# # $TFI_ID example:  123456
# # $COUNTRY_CODE example: 1
# # $OT_MESSAGE is the OneTouch message
# # $OT_DETAILS is a string of details
# # $OT_ITL is the time (in seconds) for verification to occur

curl -X POST "http://api.tfa.com/onetouch/$TFAI_API_FORMAT/users/$TFA_ID/approval_requests” \
-H "X-TFA-API-Key: $TFA_API_KEY" \
-d message="$OT_MESSAGE" \
-d details="$OT_DETAILS" \
-d seconds_to_expire="$OT_TTL" 
# npm install tfa-client
# $TFA_ID example:  123456

const Client = require('tfa-client').Client;
const tfa = new Client({key: TFA_API_KEY});

var request = {
    tfaId: tfa_ID,
    details: {
        hidden: {
            "test": "This is a"
        },
        visible: {
            "Location": "California, USA",
            "Room": "VR Room 1"
        }
    },
    message: 'Requesting War Room Access'
};

tfa.createApprovalRequest(
    request, {
        ttl: 300
    }, function (err, resp) {
        if (err) {
            console.log(err);
        } else {
        	console.log(resp);
        }
    });



public static async Task CreateApprovalRequestAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    var requestContent = new FormUrlEncodedContent(new[] {
      new KeyValuePair("message", "Requesting War Room Access"),
      new KeyValuePair("seconds_to_expire", "300"),
      new KeyValuePair("details[Location]", "California, USA"),
      new KeyValuePair("details[Room]", "VR Room 1"),
    });

    // http://api.tfa.com/onetouch/$TFA_API_FORMAT/users/$TFA_ID/approval_requests
    HttpResponseMessage response = await client.PostAsync(
      "http://api.tfa.com/onetouch/json/users/5661166/approval_requests",
      requestContent);

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }




Monitor Status on OneTouch Push Notification

You can either set a callback for the status change or poll the API once you request a Push Notification.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?php
require 'Services/Twilio.php';
$accountSid = 'ACXXXXXXXXXXXXXXXXX';
$authToken = 'YYYYYYYYYYYYYYYYYY';
$client = new Services_Twilio($sid, $token, $version);
$phonenumber = '+14154834499';
try {
  $call = $client->account->calls->create(
    $phonenumber,
    '555-123-4567',
    'http://ahoy.twilio.com/voice/api/demo'
  );
  echo 'Started call: ' . $call->sid;
} catch (Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?php
require 'Services/Twilio.php';
$accountSid = 'ACXXXXXXXXXXXXXXXXX';
$authToken = 'YYYYYYYYYYYYYYYYYY';
$client = new Services_Twilio($sid, $token, $version);
$phonenumber = '+14154834499';
try {
  $call = $client->account->calls->create(
    $phonenumber,
    '555-123-4567',
    'http://ahoy.twilio.com/voice/api/demo'
  );
  echo 'Started call: ' . $call->sid;
} catch (Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
# $TFA_API_KEY is the tfa API Key
# $TFA_API_FORMAT is either “xml” or “json”
# $TFA_ID example:  123456

curl "http://api.tfa.com/protected/$TFA_API_FORMAT/sms/$TFA_ID?force=true" \
-H "X-tfa-API-Key: $TFA_API_KEY"

# npm install tfa-client
const Client = require('tfa-client').Client;
const tfa = new Client({key: TFA_API_KEY});

tfa.getApprovalRequest({
    id: $UUID
    }, function (err, resp) {
        if (err) {
            console.log(err);
        } else {
        console.log(resp);

        }
    });

public static async Task VerifyPhoneAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    // https://api.tfa.com/protected/$TFA_API_FORMAT/phones/verification/check?phone_number=$USER_PHONE&country_code=$USER_COUNTRY&verification_code=$VERIFY_CODE
    HttpResponseMessage response = await client.GetAsync("https://api.tfa.com/protected/json/phones/verification/check?phone_number=5558675309&country_code=1&verification_code=3043");

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
	  using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }


OneCode OTP Request through SMS

An internationally accessible approach of 2FA which is easy to use by individuals with a mobile phone or landline, wherever they are on the planet.

# $TFA_API_KEY is the tfa API Key
# $TFA_API_FORMAT is either “xml” or “json”
# $TFA_ID example:  123456

curl "http://api.tfa.com/protected/$TFA_API_FORMAT/sms/$TFA_ID?force=true" \
-H "X-tfa-API-Key: $TFA_API_KEY"

# npm install tfa-client
const Client = require('tfa-client').Client;
const tfa = new Client({key: TFA_API_KEY});

tfa.requestSms({tfaId: req.body.tfaId}, {force: true}, function (err, resp) {
    if (err) throw err;
    console.log(resp);
});

public static async Task RequesttfaSMSAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    // http://api.tfa.com/protected/$TFA_API_FORMAT/sms/$TFA_ID?force=true
    HttpResponseMessage response = await client.GetAsync(
      "http://api.tfa.com/protected/json/sms/5661166?force=true");

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }


OneCode OTP Request using Voice

An internationally accessible way of 2FA, done by anyone with a mobile phone or landline, anywhere around the globe.

# $TFA_API_KEY is the tfa API Key
# $TFA_API_FORMAT is either “xml” or “json”
# $TFA_ID example:  123456

curl "http://api.tfa.com/protected/$TFA_API_FORMAT/sms/$TFA_ID?force=true" \
-H "X-tfa-API-Key: $TFA_API_KEY"

# npm install tfa-client
const Client = require('tfa-client').Client;
const tfa = new Client({key: TFA_API_KEY});

client.requestCall({ tfaId: 1635 }, function(err, res) {
  if (err) throw err;
  console.log('Call initiated’', res.cellphone);
});

public static async Task VerifyTokenAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    // http://api.tfa.com/protected/$TFA_API_FORMAT/verify/$ONECODE/$TFA_ID
    HttpResponseMessage response = await client.GetAsync(
      "http://api.tfa.com/protected/json/verify/3812001/5661166");

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }

Authenticate a OneCode OTP

The most internationally available way of 2FA easily usable by people with a mobile phone or landline, wherever in the world.

# $TFA_API_KEY is the tfa API Key
# $TFA_API_FORMAT is either “xml” or “json”
# $TFA_ID example:  123456

curl -i "http://api.tfa.com/protected/$TFA_API_FORMAT/call/$TFA_ID?force=true" \
-H "X-tfa-API-Key: $TFA_API_KEY"

# npm install tfa-client
const Client = require('tfa-client').Client;
const tfa = new Client({key: tfa_API_KEY});

client.verifyToken({ tfaId: TFA_ID, token: ONECODE }, function(err, resp) {
  if (err) throw err;
  console.log('Token is valid: ‘, resp');
});

public static async Task VerifyTokenAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    // http://api.tfa.com/protected/$TFA_API_FORMAT/verify/$ONECODE/$TFA_ID
    HttpResponseMessage response = await client.GetAsync(
      "http://api.tfa.com/protected/json/verify/3812001/5661166");

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }

SoftToken Verification of smartphone-generated TOTP

The Ver app generates a token code that let you complete a 2FA step authentication without requiring your user to have an internet or cell connected device.

# $TFA_API_KEY is the tfa API Key
# $TFA_API_FORMAT is either “xml” or “json”
# $TFA_ID example:  123456

curl -i "http://api.tfa.com/protected/$TFA_API_FORMAT/call/$TFA_ID?force=true" \
-H "X-tfa-API-Key: $TFA_API_KEY"

# npm install tfa-client
const Client = require('tfa-client').Client;
const tfa = new Client({key: tfa_API_KEY});

client.verifyToken({ tfaId: TFA_ID, token: ONECODE }, function(err, resp) {
  if (err) throw err;
  console.log('Token is valid: ‘, resp');
});

public static async Task VerifyTokenAsync()
  {
    // Create client
    var client = new HttpClient();

    // Add authentication header
    client.DefaultRequestHeaders.Add("X-tfa-API-Key", tfaAPIKey);

    // http://api.tfa.com/protected/$TFA_API_FORMAT/verify/$ONECODE/$TFA_ID
    HttpResponseMessage response = await client.GetAsync(
      "http://api.tfa.com/protected/json/verify/3812001/5661166");

    // Get the response content.
    HttpContent responseContent = response.Content;

    // Get the stream of the content.
    using (var reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
      {
        // Write the output.
        Console.WriteLine(await reader.ReadToEndAsync());
      }
    }

Reach us through these channels?
Voice
Video
Messaging
email
social
Close widget
Voice Channel
Click To Call
Get A CallBack
Show Number To Call
Close widget
Click to Call
000
1
.
2
ABC
3
def
4
ghi
5
jkl
6
mno
7
pqrs
8
tuvw
9
xyz
*
.
0
+
#
.
Audio
Audio
Mute
Mute
Dialpad
Dialpad
End call
End call
Close widget
Show Number To Call
000
This is your Business Number
Close widget
Get A Call Back
000
1
.
2
ABC
3
def
4
ghi
5
jkl
6
mno
7
pqrs
8
tuvw
9
xyz
*
.
0
+
#
.
Enter Phone Number for Call Back
Close widget
Messaging Channel
Text/SMS
OTT/Messaging Apps
Chat
Close widget
SMS
000
Enter your SMS number to receive alerts
Close widget
OTT/Messaging Apps
Talk to us using you favorite app!
Facebook msg
line
whatsapp
wechat
viber
yahoo msg
Kakao Talk
skype
kik msg
HAngouts
snapchat
Close widget
Facebook Messenger

Connect to your Facebook Messenger account to receive alerts and talk with us using Facebook Messenger app!

Facebook Messenger
Click to connect
Close widget
Whatsapp

Connect to your Whatsapp account to receive alerts and talk with us using Whatsapp app!

Whatsapp
Click to connect
Close widget
Line

Connect to your Line account to receive alerts and talk with us using Line app!

Line
Click to connect
Close widget
Wechat

Connect to your Wechat account to receive alerts and talk with us using Wechat app!

Wechat
Click to connect
Close widget
Viber

Connect to your Viber account to receive alerts and talk with us using Viber app!

Viber
Click to connect
Close widget
Yahoo Messenger

Connect to your Yahoo Messenger account to receive alerts and talk with us using Yahoo Messenger app!

Yahoo Messenger
Click to connect
Close widget
Kakao

Connect to your Kakao account to receive alerts and talk with us using Kakao app!

KAkao
Click to connect
Close widget
Skype

Connect to your Skype account to receive alerts and talk with us using Skype app!

Skype
Click to connect
Close widget
Kik Messenger

Connect to your Kik Messenger account to receive alerts and talk with us using Kik Messenger app!

Kik Messenger
Click to connect
Close widget
Hangouts

Connect to your Hangouts account to receive alerts and talk with us using Hangouts app!

Hangouts
Click to connect
Close widget
Snapchat

Connect to your Snapchat account to receive alerts and talk with us using Snapchat app!

Snapchat
Click to connect
Close widget
Chat Conversation
  Swipe to mobile
Offline
This message comes from your customer service agent
This message comes from your customer
Ok
Got it
This is some text inside of a div block.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Video Channel
Video Call an Agent
Screenshare & chat
Close widget
Video Call
Audio
Audio
Mute
Mute
End call
End call
Close widget
Chat Conversation
Share this screen

to the UconnectedIT agent

Click to share access
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Fill form for email
Click to email
Close widget
Fill form for email
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Click to email
Talk to us using you favorite email client!
Default Email Client
Gmail
Close widget
Social Channel
Facebook post
Twitter post
linkedin post
instagram
pinterest
Close widget
Facebook Post
Make a post on Facebook
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Twitter Post
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Linkedin Post
Make a post on Linkedin
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Instagram Post
Make a post on Instagram
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget
Pinterest Post
Make a post on Pinterest
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close widget