Download the PHP package selivery/enterprise-sdk-php without Composer
On this page you can find all versions of the php package selivery/enterprise-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download selivery/enterprise-sdk-php
More information about selivery/enterprise-sdk-php
Files in selivery/enterprise-sdk-php
Download selivery/enterprise-sdk-php
More information about selivery/enterprise-sdk-php
Files in selivery/enterprise-sdk-php
Vendor selivery
Package enterprise-sdk-php
Short Description Official PHP SDK for Selivery Enterprise API
License MIT
Package enterprise-sdk-php
Short Description Official PHP SDK for Selivery Enterprise API
License MIT
Please rate this library. Is it a good library?
Informations about the package enterprise-sdk-php
Selivery Enterprise PHP SDK
Official PHP SDK for the Selivery Enterprise API.
Installation
- Require via Composer:
composer require selivery/enterprise-sdk-php - Requires PHP ^8.2 with
ext-opensslandext-json.
Usage
Method: send
send(...) automatically:
- looks up the phone's public key,
- generates a crypto‑random vector (default 32 chars),
- encrypts each secret value using RSA PKCS#1 v1.5 (
openssl_public_encrypt) with that vector, and - includes the resolved
key_uuidand the generatedvectorin the request.
No sender parameter is needed (it is derived from the template on the service).
Method: sendLight
Difference from send:
- send encrypts values locally in the SDK and sends only encrypted chunks to Selivery. This means even Selivery (or any intermediary) cannot read your values.
- sendLight accepts plaintext values; Selivery encrypts them as the very first step on the server and then handles only encrypted values afterward. Both methods are secure; send offers an even stricter privacy boundary since plaintext never leaves your process.
Token caching (PSR-16)
Inject any PSR-16 cache to enable automatic caching and refresh of OAuth tokens.
Examples
- Send message:
SELIVERY_SECRET=your-secret php examples/service_send.php - Send light message:
SELIVERY_SECRET=your-secret php examples/service_send_light.php
Notes
EnterpriseClientis the only public entry point. Callsend(...)orsendLight(...)on it directly.- The SDK uses your secret only for
generate-token. - Service requests use the generated
access_tokenautomatically. - If a cache is provided, the SDK stores both access and refresh tokens and refreshes the access token when needed.
- POST endpoints accept JSON bodies; include
Content-Type: application/json. - The
senderfield has been removed from SDK methods and requests; it is derived from the template server‑side. - Token cache key default:
selivery_enterprise_sdk_tokens:{sha1(baseUrl)}. Avoid putting secrets in cache keys. - Safety window default: 60s. Treats token as expired when
now >= expires_at - safety_window.
PSR-16 implementations
- Symfony Cache:
Psr16CacheoverFilesystemAdapter(disk) orRedisAdapter(Redis). - Any PSR-16 provider is supported: pass your
Psr\SimpleCache\CacheInterfacetoEnterpriseClient.
See examples:
- Symfony filesystem cache:
php examples/cache_symfony.php - Symfony Redis cache:
php examples/cache_redis_symfony.php
All versions of enterprise-sdk-php with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
ext-json Version *
guzzlehttp/guzzle Version ^7.9
psr/simple-cache Version ^3.0
ext-openssl Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.9
psr/simple-cache Version ^3.0
ext-openssl Version *
The package selivery/enterprise-sdk-php contains the following files
Loading the files please wait ...