craftcodery / authy-php
PHP client for Authy
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ~6.0 || ~7.0
Requires (Dev)
- phpunit/phpunit: ^9.4.0
README
Documentation for PHP 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.
Authy Quickstart
For a full tutorial, check out the PHP/Laravel Authy Quickstarts in our docs:
Authy PHP Installation
This library requires PHP 7.4+
Install with composer. The craftcodery/authy-php
package is available on Packagist.
composer require craftcodery/authy-php
Usage
To use the Authy client, import AuthyApiClient and initialize it with your production API Key found in the Twilio Console:
$authy_api = new Authy\AuthyApi('#your_api_key');
2FA Workflow
OR
Phone Verification
Phone verification now lives in the Twilio API and has PHP 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
Copyright (c) 2011-2020 Authy Inc. See LICENSE for further details.