0

I'm trying to implement 2FA in my application using Authy API basing on this documentation page https://www.twilio.com/docs/authy/api/users. Everything works fine but I struggle to understand how to generate auxiliary code that can be used as a replacement for QR code.

See screenshot below and field "Manual entry" (screenshot is obviously from different app but I'm targeting similar implementation) qr manual entry field in the app

I cannot find in any documentation information on how to generate this code.

I assume it can be built using QR string that later is transformed into QR image, but QR string itself is pretty long and those manual entry codes in different applications tend to be short.

mrkf
  • 11
  • 3

1 Answers1

0

Twilio developer evangelist here.

I would recommend, as the Authy documentation does, that you implement 2FA using the Twilio Verify API (which is effectively the Authy API v2).

When you implement third party authenticator applications through Verify, you create a new TOTP factor and the API response returns both the secret and the OTP URL that can be encoded as a QR code.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Thanks, I went through the documentation provided by you and I think I was able to achieve to generate this kind of manual entry token. However, with Verify API I see no options to use OneTouch push notifications. Is it available to use this kind of notfication when using Verify Api ? – mrkf Feb 04 '22 at 09:57
  • You're right, the OneTouch integration with the Authy application isn't part of the Verify API. You can do [push authentication and implement the Twilio Verify SDK in your own application to achieve the same though](https://www.twilio.com/docs/verify/push). I'm afraid that if you need the secret, as in your original question, that the Authy API doesn't support it, but if you need OneTouch with the Authy app, that Verify doesn't exactly support that. – philnash Feb 05 '22 at 00:30