Knowledge Base > Article [0012]

How to use Twitter to send out OTP in DualShield

Apart from the classical SMS and SMTP channels, DualShield can utilize Twitter to deliver OTP to the user. This is the Twitter direct message which is one to one and private, not the broadcast message.

In order to use Twitter service to send OTP in DualShield, you need to configure the Twitter Gateway:

  1. select "Configuration | Gateways" from the main menu in the DualShield Management Console (DMC)
  2. click "create" button on the toolbar

      

  1. select "Twitter" in the "Type" list
  2. press "Edit" button

         

Note: Twitter has changed the server URI to https://api.twitter.com/1.1/direct_messages/new.json. Please use the new one instead

Now, you need to provide the following information: Consumer Key, Consumer Secret, Access Token, and Token Secret.

Where can we get that information from?

Visit https://dev.twitter.com/apps/new, logging in if necessary. Follow the instruction to create an application. After creation, you can see its details. By default, the access level is "Read-only". You can get the Consumer Key and its secret in the section "OAuth settings" 

       

Before creating the access token, we need to change the access level. This is VERY important!

           

Click the tab "Settings", change the access type to "Read and Write", then press the button "Update this Twitter application settings" at the bottom.

         

Now, go back to the "Details" tab, check the status of the access level. If it has been changed to "Read and write", then you can press the button "Create my access token" You should now see the access token and its secret.

             

Finally, enter those details in DualShiled and Save.

 

Reference

Creating a Twitter OAuth application: http://net.tutsplus.com/tutorials/php/creating-atwitter-oauth-application