🚨🚨🚨
This library is no longer actively maintained. The Authy API has been replaced with the Twilio Verify API. Twilio will support the Authy API through November 1, 2022 for SMS/Voice. After this date, we’ll start to deprecate the service for SMS/Voice. Any requests sent to the API after May 1, 2023, will automatically receive an error. Push and TOTP will continue to be supported through July 2023.
Learn more about migrating from Authy to Verify.
Please visit the Twilio Docs for:
Please direct any questions to Twilio Support. Thank you!
🚨🚨🚨
Documentation for Java usage of the Authy API lives in the official Twilio documentation.
The Authy API supports multiple channels of 2FA:
- One-time passwords via SMS and voice.
- Soft token (TOTP via the Authy App)
- Push authentication via the Authy App
If you only need SMS and Voice support for one-time passwords, we recommend using the Twilio Verify API instead.
More on how to choose between Authy and Verify here.
For a full tutorial, check out either of the Java Authy Quickstarts in our docs:
This project uses json.org, you can find the json.org jar versions here
- Ant: no need to include json.org since ant already includes it in the final jar.
- Maven: need to include the json.org jar in your jar external libraries.
Add the library to the project by putting it in the dependencies section of your pom.xml
:
<!-- 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")
OR
Phone verification now lives in the Twilio API and has Java support through the official Twilio helper libraries.
Legacy (V1) documentation here. Verify V1 is not recommended for new development. Please consider using Verify V2.
Copyright (c) 2011-2020 Authy Inc. See LICENSE for further details.