PHPackages                             klevio/klevio-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. klevio/klevio-api

ActiveLibrary

klevio/klevio-api
=================

Laravel package for integrating with the Klevio API

1.0.0(1y ago)141MITPHPPHP ^8.1

Since Dec 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sagor110090/klevio-klevio-api)[ Packagist](https://packagist.org/packages/klevio/klevio-api)[ Docs](https://github.com/klevio/klevio-api)[ RSS](/packages/klevio-klevio-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

🔐 Laravel Klevio API Package
============================

[](#-laravel-klevio-api-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/90e27135045fa13437fdd9c603faacd8f7798562370883996a7d2f53c289139d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6c6576696f2f6b6c6576696f2d6170692e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/klevio/klevio-api)[![Total Downloads](https://camo.githubusercontent.com/e3ba9ecf09f6965b6430a3ed39fbcec3d9013fd800714d1dfd02989df1b7f3a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6c6576696f2f6b6c6576696f2d6170692e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/klevio/klevio-api)[![License](https://camo.githubusercontent.com/7303f6fc66daea43ee49c5f5ff9e68db4ba8d5cd2bdf34586324ece5f49d2e19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6c6576696f2f6b6c6576696f2d6170693f7374796c653d666f722d7468652d6261646765)](LICENSE.md)

A powerful Laravel package for seamless integration with [Klevio's](https://klevio.com/) smart access control system. Manage digital keys, access rights, and smart locks with enterprise-grade security.

[Documentation](#documentation) • [Installation](#installation) • [Usage Examples](#usage) • [Contributing](#contributing)

✨ Features
----------

[](#-features)

- 🔒 **Secure Authentication** - JWT-based API authentication
- 🔑 **Key Management** - Grant and revoke access rights
- 🏢 **Property Control** - Manage multiple properties
- 📱 **Smart Lock Integration** - Remote lock/unlock capabilities
- 🔄 **Real-time Operations** - Instant access management
- 🛡️ **Enterprise Security** - ES256 encryption

📚 Documentation
---------------

[](#-documentation)

Comprehensive documentation is available:

- [API Documentation (PDF)](assets/Klevio%20Public%20API%20Docs%20(V2).pdf)
- [Official Klevio Website](https://klevio.com/)

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require klevio/klevio-api
```

### Getting Started

[](#getting-started)

1️⃣ **Sign Up for API Access**

- Visit [Klevio Scheduler Portal](https://operations.klevio.net/scheduler/signup)
- Complete the registration process
- Obtain your API credentials

2️⃣ **Generate Security Keys**

```
# Generate ES256 Private Key
openssl ecparam -genkey -name secp256k1 -out private_key.pem

# Extract Public Key
openssl ec -in private_key.pem -pubout -out public_key.pem
```

3️⃣ **Configure Environment**

Add to your `.env` file:

```
KLEVIO_CLIENT_ID="your_client_id"
KLEVIO_API_KEY="your_api_key"
KLEVIO_API_URL="https://api.klevio.com/v2"

# Keys should be properly formatted with escaped newlines
KLEVIO_PRIVATE_KEY="-----BEGIN EC PRIVATE KEY-----\nMIGHAgEA...\n-----END EC PRIVATE KEY-----"
KLEVIO_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMFkwEwYH...\n-----END PUBLIC KEY-----"
```

💡 Usage Examples
----------------

[](#-usage-examples)

### Managing Access Keys

[](#managing-access-keys)

```
use Klevio\KlevioApi\Facades\KlevioApi;

// Grant Access with Metadata
$response = KlevioApi::grantKey(
    propertyId: 'property-123',
    email: 'guest@example.com',
    from: '2024-01-01T00:00:00Z',
    to: '2024-01-07T23:59:59Z',
    metadata: [
        'reservationId' => 'booking-123',
        'guestName' => 'John Doe',
        'roomNumber' => '101'
    ]
);

// List Property Keys
$keys = KlevioApi::getKeys('property-123');

// Control Lock
$response = KlevioApi::useKey('key-123');
```

### Error Handling

[](#error-handling)

```
use GuzzleHttp\Exception\RequestException;

try {
    $response = KlevioApi::useKey('key-123');
} catch (RequestException $e) {
    Log::error('Klevio API Error', [
        'message' => $e->getMessage(),
        'code' => $e->getCode()
    ]);
}
```

🛡️ Security Best Practices
--------------------------

[](#️-security-best-practices)

- Store credentials securely using environment variables
- Never commit sensitive keys to version control
- Regularly rotate API keys
- Monitor API access logs
- Use HTTPS for all API communications

🧪 Testing
---------

[](#-testing)

```
composer test
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

🔗 Links
-------

[](#-links)

- [Klevio Website](https://klevio.com)
- [API Documentation](assets/Klevio%20Public%20API%20Docs%20(V2).pdf)
- [Support](mailto:mehedihasansagor.cse@gmail.com)

---

Made with ❤️ by [Mehedi Hasan Sagor](mailto:mehedihasansagor.cse@gmail.com)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

496d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/99445e20972ed9112b4b2be64575c9ed21fe6fdb385d828429159019deaf8b1e?d=identicon)[sagor110090](/maintainers/sagor110090)

---

Top Contributors

[![sagor110090](https://avatars.githubusercontent.com/u/23266843?v=4)](https://github.com/sagor110090 "sagor110090 (9 commits)")

---

Tags

access-controlklevioklevio-apismart-locks

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/klevio-klevio-api/health.svg)

```
[![Health](https://phpackages.com/badges/klevio-klevio-api/health.svg)](https://phpackages.com/packages/klevio-klevio-api)
```

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

4684.7k2](/packages/fschmtt-keycloak-rest-api-client-php)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
