Documentation for Java usage of the Authy API lives in the official Twilio documentation.
The Authy API supports multiple channels of 2FA:
If you only need SMS and Voice support for one-time passwords, we recommend using the Twilio Verify API instead.
For a full tutorial, check out either of the Java Authy Quickstarts in our docs:
Add the library to the project by putting it in the dependencies section of your
<!-- https://mvnrepository.com/artifact/com.authy/authy-java --> <dependency> <groupId>com.authy</groupId> <artifactId>authy-java</artifactId> <version>1.5.0</version> </dependency>
To use the Authy client, import the API and initialize it with your production API Key found in the Twilio Console:
import com.authy.*; import com.authy.api.*; AuthyApiClient client = new AuthyApiClient("your-api-key")
Copyright (c) 2011-2020 Authy Inc. See LICENSE for further details.