https://github.com/veryfi/veryfi-java
Java module for communicating with the Veryfi OCR API.
https://github.com/veryfi/veryfi-java
api java java-library java-sdk sdk
Last synced: about 2 months ago
JSON representation
Java module for communicating with the Veryfi OCR API.
- Host: GitHub
- URL: https://github.com/veryfi/veryfi-java
- Owner: veryfi
- License: mit
- Created: 2021-07-12T03:15:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T21:52:13.000Z (6 months ago)
- Last Synced: 2025-04-08T04:34:11.253Z (3 months ago)
- Topics: api, java, java-library, java-sdk, sdk
- Language: Java
- Homepage:
- Size: 9.62 MB
- Stars: 12
- Watchers: 7
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
[](https://openjdk.java.net/projects/jdk/16/)
[](https://github.com/veryfi/veryfi-java/actions/workflows/maven.yml)
[](https://github.com/veryfi/veryfi-java/actions/workflows/maven-publish.yml)**veryfi** is a Java module for communicating with the [Veryfi OCR API](https://veryfi.com/api/)
## Installation
Install from [Maven](https://mvnrepository.com/), a
package manager for Java.Install the package using Maven:
```bash
com.veryfi
veryfi-java
2.0.0
```
Install the package using Gradle:
```bash
implementation group: 'com.veryfi', name: 'veryfi-java', version: '2.0.0'
```## 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/](https://hub.veryfi.com/signup/api/)### Java API Client Library
The **veryfi** library can be used to communicate with Veryfi API. All available functionality is described here https://veryfi.github.io/veryfi-java/veryfi/Client.htmlBelow is the sample script using **veryfi** to OCR and extract data from a document:
```java
import veryfi.*;
import java.util.Arrays;
import java.util.List;public class Main {
public static void main(String[] args) {
String clientId = "your_client_id";
String clientSecret = "your_client_secret";
String username = "your_username";
String apiKey = "your_password";
Client client = VeryfiClientFactory.createClient(clientId, clientSecret, username, apiKey);
List categories = Arrays.asList("Advertising & Marketing", "Automotive");
String jsonResponse = client.processDocument("example1.jpg", categories, false, null);
}
}
```Update a document
```java
import veryfi.*;
import org.json.JSONObject;public class Main {
public static void main(String[] args) {
String clientId = "your_client_id";
String clientSecret = "your_client_secret";
String username = "your_username";
String apiKey = "your_password";
Client client = VeryfiClientFactory.createClient(clientId, clientSecret, username, apiKey);
String documentId = "your_document_id";
JSONObject parameters = new JSONObject();
parameters.put("category", "Meals & Entertainment");
parameters.put("total", 11.23);
String jsonResponse = client.updateDocument(documentId, parameters);
}
}
```## 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 [email protected].
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 Java SDK.
[Link to blog post →](https://www.veryfi.com/java/)