Download the PHP package simpleverify/simpleverify-php without Composer
On this page you can find all versions of the php package simpleverify/simpleverify-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simpleverify/simpleverify-php
More information about simpleverify/simpleverify-php
Files in simpleverify/simpleverify-php
Package simpleverify-php
Short Description PHP client library for the SimpleVerify API - developer-first verification alerts (SMS, email, magic link)
License MIT
Homepage https://simpleverify.com
Informations about the package simpleverify-php
SimpleVerify PHP SDK
Official PHP client library for the SimpleVerify API. Send and verify SMS codes, email codes, and magic links with a few lines of code.
Requirements
- PHP 8.1+
- cURL extension
- JSON extension
Installation
Quick Start
Usage
Initialize the Client
Send a Verification
The response is a Verification object:
Test Mode
When using a vk_test_ API key, the response includes the code or token so you can complete the flow without real SMS/email delivery:
In live mode (vk_live_ key), $verification->test is null.
If you set failure_redirect_url on a magic link, failed clicks redirect there with status (invalid, expired, or already_used) and verification_id query parameters.
Successful magic link clicks redirect with status=verified, verification_id, and a one-time exchange_code. Redeem that code from your backend:
Check a Code
An invalid code returns valid: false (not an exception). Only check the valid field.
Get Verification Status
Error Handling
All API errors throw specific exceptions extending SimpleVerifyException:
| HTTP Status | Exception |
|---|---|
| 401 | AuthenticationException |
| 404 | NotFoundException |
| 422 | ValidationException |
| 429 | RateLimitException |
| Other | ApiException |
| Network failure | ConnectionException |
Testing
The client accepts a custom HTTP client for testing. See the tests/ directory for examples using MockHttpClient.
License
MIT
All versions of simpleverify-php with dependencies
ext-curl Version *
ext-json Version *