Download the PHP package openapi/openapi-sdk without Composer
On this page you can find all versions of the php package openapi/openapi-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download openapi/openapi-sdk
More information about openapi/openapi-sdk
Files in openapi/openapi-sdk
Package openapi-sdk
Short Description Minimal and agnostic PHP SDK for Openapi® (https://openapi.com)
License MIT
Informations about the package openapi-sdk
Openapi® client for PHP
The perfect starting point to integrate Openapi® within your PHP project
[](https://github.com/openapi/openapi-php-sdk/actions/workflows/php.yml) [](https://packagist.org/packages/openapi/openapi-sdk) [](https://packagist.org/packages/openapi/openapi-sdk) [](LICENSE) [](https://packagist.org/packages/openapi/openapi-sdk)[](https://www.linuxfoundation.org/about/members)
Overview
A minimal and agnostic PHP SDK for Openapi, inspired by a clean client implementation. This SDK provides only the core HTTP primitives needed to interact with any Openapi service.
Pre-requisites
Before using the Openapi PHP Client, you will need an account at Openapi and an API key to the sandbox and/or production environment
Features
- Agnostic Design: No API-specific classes, works with any Openapi service
- Minimal Dependencies: Only requires PHP 8.0+ and cURL
- OAuth Support: Built-in OAuth client for token management
- HTTP Primitives: GET, POST, PUT, DELETE, PATCH methods
- Clean Interface: Similar to the Rust SDK design
- Static Analysis: PHPStan level 6 configuration available via Composer
What you can do
With the Openapi PHP Client, you can easily interact with a variety of services in the Openapi Marketplace. For example, you can:
- 📩 Send SMS messages with delivery reports and custom sender IDs
- 💸 Process bills and payments in real time via API
- 🧾 Send electronic invoices securely to the Italian Revenue Agency
- 📄 Generate PDFs from HTML content, including JavaScript rendering
- ✉️ Manage certified emails and legal communications via Italian Legalmail
For a complete list of all available services, check out the Openapi Marketplace 🌐
Installation
You can add the Openapi PHP Client to your project with the following command:
Quick Start
Token Generation
Making API Calls
Architecture
This SDK follows a minimal approach with only essential components:
OauthClient: Handles OAuth authentication and token managementClient: Agnostic HTTP client for API callsException: Error handlingCache\CacheInterface: Optional caching interface
Requirements
- PHP 8.0 or higher
- cURL extension
- JSON extension
Examples
You can find complete examples in the examples/ directory:
examples/token_generation.php- OAuth token generation exampleexamples/api_calls.php- HTTP API calls exampleexamples/complete_workflow.php- End-to-end workflow example
Run examples with:
Testing
Run tests with:
Static Analysis
This SDK includes PHPStan as a Composer development dependency to help keep the codebase type-safe and maintainable.
PHPStan is configured in phpstan.neon and currently runs at level 6.
Run static analysis with:
Contributing
Contributions are always welcome! Whether you want to report bugs, suggest new features, improve documentation, or contribute code, your help is appreciated.
See docs/code-of-conduct.md to help maintain a welcoming and collaborative environment.
Authors
Meet the project authors:
- L. Paderi (@lpaderiAltravia)
- Openapi Team (@openapi-it)
Partners
Meet our partners using Openapi or contributing to this SDK:
- Blank
- Credit Safe
- Deliveroo
- Gruppo MOL
- Jakala
- Octotelematics
- OTOQI
- PWC
- QOMODO S.R.L.
- SOUNDREEF S.P.A.
Our Commitments
We believe in open source and we act on that belief. We became Silver Members of the Linux Foundation because we wanted to formally support the ecosystem we build on every day. Open standards, open collaboration, and open governance are part of how we work and how we think about software.
License
This project is licensed under the MIT License.
The MIT License is a permissive open-source license that allows you to freely use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, provided that the original copyright notice and this permission notice are included in all copies or substantial portions of the software.
In short, you are free to use this SDK in your personal, academic, or commercial projects, with minimal restrictions. The project is provided "as-is", without any warranty of any kind, either expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
For more details, see the full license text at the MIT License page.