The TwilioAuth SDK has been deprecated. This means that while we will continue to provide maintenance support for existing customers and their usage, we discourage new customers and new usage, as we may shut it down entirely in the future. We strongly recommend using the Verify Push SDK instead, which currently supports the Push channel, and will be enhanced to support the TOTP channel in the future.
For instructions on how to get the AUTHY_API_KEY please read this tutorial
Step 2: Deploy the sample backend application
We recommend deploying for free with Heroku. You can learn more about how to do that in the Heroku documentation
Download or clone the sample backend here: https://github.com/authy/authy-sdk-backend
Next, we'll create an Authy user.
curl -XPOST "https://api.authy.com/protected/json/users/new \ -H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9" \ -d user[email]="email@example.com" \ -d user[cellphone]="317-338-9302" \ -d user[country_code]="54"
Follow the instructions to setup the Sample App. Start the application from XCode and in the simulator you'll be able to enter your USER_AUTHY_ID from step #5 and your sample backend URL from step #2.
In the sample app, enter the USER_AUTHY_ID from step #5 and your sample backend URL from step #2
curl "https://api.authy.com/onetouch/json/users/$USER_AUTHY_ID/approval_requests" \ -H "X-Authy-API-Key: $AUTHY_API_KEY" \ -d message="Login requested for a CapTrade Bank account." \ -d details[username]="Bill Smith" \ -d details[location]="California, USA" \ -d details[Account]="981266321" \ -d hidden_details[transaction_num]="TR139872562346" \ -d seconds_to_expire=1200
More info about creating approval requests
You can also use the sample API scripts available here to create a new approval request.
If you have configured Twilio to handle the push notification, it will prompt the user to open the app and in turn the SDK will sync the request.
Otherwise, to manually sync the requests to the sample app, refresh the screen. Then, you will be able to Approve or Deny the request in the sample app:
To delete a specific device you can use the sample API scripts available here
To obtain the :device_id call the
getDeviceId method of the sdk
If you find any issues while following this guide please file us an issue in the respective Github project: