Download the PHP package shaykhnazar/hikvision-isapi without Composer

On this page you can find all versions of the php package shaykhnazar/hikvision-isapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hikvision-isapi

Hikvision ISAPI for Laravel

Latest Version License: MIT PHP Version Laravel Version

Talk to Hikvision access-control terminals from Laravel: enrol people, push cards and faces, and read who went through which door.

Why this exists

A Hikvision terminal already holds everything an attendance or access system needs. Getting it out is the problem. ISAPI is XML over digest auth, sparsely documented, and inconsistent between models — and the parts that go wrong go wrong quietly:

Where the device's behaviour genuinely cannot be known without hardware, this package says so rather than guessing — see Device compatibility.

Features

Table of Contents

Device compatibility

No model in this table has been confirmed yet. The package is written against the ISAPI specification and its own test suite; nobody has run it against a terminal and reported back. Saying so is more useful than an unsourced list — if this table claimed five models and was wrong about one, every row would stop being worth reading.

Model Firmware Paging Event total Faces Reported by
(nothing confirmed yet)

Adding a row

Run the probe against your device and open a pull request with the result:

It is read-only — it never creates, updates or deletes anything, and the refusals it records are provoked with reads. It puts no employee name, card or number in the report; the person list is read for its shape only. Read the file before attaching it, as the tool tells you to.

The report answers every column above, including the two this package could not settle on its own: whether the device honours a search session across pages, and which key it returns an event total under.

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Configuration

Add these environment variables to your .env file:

Configuration File

The published config/hikvision.php supports multiple devices:

Probing a device

Terminals differ. Capacity limits, which endpoints exist, and the exact subStatusCode behind each refusal all vary by model and firmware, and the documentation does not say. bin/hikvision-probe asks a device directly and writes the answers to a JSON file:

Two things it guarantees, both enforced by tests:

It never writes. Every request is a read, including the ones that provoke refusals. It is safe to run against a terminal a business depends on.

It never carries anybody out. The person list is read for its shape — row counts, paging fields, what a row's keys are called. Field names are kept, field values are not, and the address you probed is not in the report either. What the file does contain is the device's own identity and behaviour, which is the point of it.

The report also lists what it could not answer and why — a file with ten answers and no mention of the eleventh question reads as complete.

If you run this against a model that is not in the compatibility notes yet, the report is exactly what a pull request adding it needs.

Quick Start

Check Device Status

Add a Person

Upload Face Image

Search and Manage Face Data

Search Persons

Paginating by hand? Pass the same $searchId to every call. ISAPI treats it as the identity of a search session, and changing it mid-walk makes the device start over — silently. all() handles this for you.

Add Card

Control Doors

Search Events

Event Webhooks & Notifications (v1.4.0+)

Configure Hikvision devices to automatically push events (access granted, face recognized, etc.) to your application's webhook endpoint in real-time. This eliminates the need for polling and provides instant event notifications.

Configure Webhook Endpoint

The EventNotificationService allows you to configure HTTP event notifications on Hikvision devices:

Simple Webhook Setup

The easiest way to set up a webhook is using the configureWebhook() method:

Advanced Webhook Configuration

For more control over webhook configuration, use configureHttpHost():

Managing Webhook Hosts

Testing Webhooks

Test if your webhook endpoint is reachable from the device:

Receiving Webhook Events

Create a controller to receive webhook events from Hikvision devices:

Route setup:

Multi-Device Webhook Setup

Configure webhooks for multiple devices:

Webhook Security

Protect your webhook endpoint:

Webhook Event Examples

Access Control Event (Face Recognition):

Motion Detection Event:

Using the Facade

Services Overview

DeviceService

PersonService

CardService

FaceService

FingerprintService

AccessControlService

EventService

EventNotificationService

DTOs (Data Transfer Objects)

Person DTO

Card DTO

Face DTO

Enums

UserType

EventType

Error Handling

All exceptions extend HikvisionException:

Multi-Device Support

The package supports managing multiple Hikvision devices simultaneously. This is useful when you have multiple terminals at different locations (entrance, exit, canteen, etc.).

Device Sources Supported:

Configuration from Config Files (Default)

Configure multiple devices in config/hikvision.php:

Environment Variables

Add device-specific environment variables to .env:

Using Multiple Devices with Facade

Using Multiple Devices with Services

Syncing Employee to Multiple Devices

Device Manager Methods

The DeviceManager provides the following methods:

Backward Compatibility

The package maintains 100% backward compatibility. If you're using the default device setup, your existing code will work without any changes:

Loading Devices from Database

For applications that store terminal configurations in database (multi-tenant, dynamic terminals, etc.), use the DatabaseDeviceProvider:

Step 1: Create Terminals Table

Step 2: Register Database Provider

In your AppServiceProvider or custom service provider:

Step 3: Use Terminals from Database

Step 4: Reload Devices When Database Changes

Using Eloquent Models with CallbackProvider

For more complex scenarios with Eloquent relationships:

Multi-Tenant Support Example

For multi-tenant applications where each tenant has their own terminals:

Runtime Device Registration

Register devices dynamically at runtime:

Switching Providers at Runtime

Change device provider dynamically:

Advanced Usage

Batch Operations

Pagination

Custom HTTP Requests

Testing

Troubleshooting

Authentication Failed (401)

Check your credentials in .env:

Connection Timeout

Face Upload Fails

Device Not Found

Security

See SECURITY.md for supported versions, vulnerability reporting instructions, and disclosure policy. Do not open public GitHub issues for suspected vulnerabilities; report them privately through the channels described there.

Contributing

Two contributions are worth more than the rest: a compatibility report from a real device, and a failure where nothing threw. Both are explained in CONTRIBUTING.md, along with how to run the tests.

Nobody has confirmed this package against a terminal yet. If you have one, the probe takes a minute and answers questions the specification does not.

Changelog

For full release history, see CHANGELOG.md and the GitHub releases/tags.

v1.5.4 (2025-11-05)

v1.4.0 (2025-10-30)

v1.3.0 (2025-10-13)

v1.2.0 (2025-10-13)

v1.1.0 (2025-10-13)

v1.0.0 (2025-10-09)

License

This package is open-sourced software licensed under the MIT license.

Credits

Support

For issues, questions, or contributions:

Built on this package

Davomat — a finished attendance product for companies that already own Hikvision terminals (closed source; this package is the part that is not): an on-site agent that reaches the devices behind NAT, a multi-tenant cloud that turns swipes into a monthly timesheet, Excel export, and a daily Telegram summary for the director.

If you are reading this because you were asked to "get the timesheet out of the terminal", that is the same problem, already solved. Ask: [email protected].

Disclaimer

This package is designed for legitimate access control systems and defensive security purposes only. Do not use for malicious purposes.


Made with ❤️ for the Laravel community


All versions of hikvision-isapi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0|^13.0
guzzlehttp/guzzle Version ^7.8
ext-curl Version *
ext-json Version *
ext-simplexml Version *
ext-libxml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shaykhnazar/hikvision-isapi contains the following files

Loading the files please wait ...