veryfi / veryfi-php
veryfi sdk for php
Installs: 53 709
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 4
Forks: 0
Open Issues: 2
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: 9.5.18
README
https://veryfi.github.io/veryfi-php/
Veryfi is a php module for communicating with the Veryfi OCR API
Installation
In your project root run
composer require veryfi/veryfi-php
Getting Started
Obtaining Client ID and user keys
If you don't have an account with Veryfi, please go ahead and register here: https://hub.veryfi.com/signup/api/
php API Client Library
The Veryfi library can be used to communicate with Veryfi API. All available functionality is described here DOC
Below is the sample script using Veryfi to OCR and extract data from a document:
How to use it?
// First, include the autoload file generated by Composer require_once "path_to_your_vendor_autoload"; // Then use the Veryfi API use veryfi\Client;
Process a document
$client_id = 'your_client_id'; $client_secret = 'your_client_secret'; $username = 'your_username'; $api_key = 'your_api_key'; $veryfi_client = new Client($client_id, $client_secret, $username, $api_key); $categories = array('Advertising & Marketing', 'Automotive'); $file = 'path_to_your_image'; $return_associative = true; $delete_after_processing = false; $json_response = json_decode($veryfi_client->process_document($file, $categories, $delete_after_processing), $return_associative);
Update a document
$client_id = 'your_client_id'; $client_secret = 'your_client_secret'; $username = 'your_username'; $api_key = 'your_api_key'; $veryfi_client = new Client($client_id, $client_secret, $username, $api_key); $document_id = 'your_document_id' //as int $parameters = array('category' => 'Meals & Entertainment', 'total' => 11.23); $return_associative = true; $json_response = json_decode($veryfi_client->update_document($document_id, $parameters), $return_associative);
Need help?
Visit https://docs.veryfi.com/ to access integration guides and usage notes in the Veryfi API Documentation Portal
If you run into any issue or need help installing or using the library, please contact support@veryfi.com.
If you found a bug in this library or would like new features added, then open an issue or pull requests against this repo!
To learn more about Veryfi visit https://www.veryfi.com/
Tutorial
Below is an introduction to the php SDK.