Download the PHP package frain/convoy without Composer
On this page you can find all versions of the php package frain/convoy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package convoy
Short Description Convoy PHP SDK Library
License MIT
Homepage https://github.com/frain/convoy
Informations about the package convoy
Convoy SDK for PHP
This is the Convoy PHP SDK. This SDK contains methods for easily interacting with Convoy's API. Below are examples to get you started. See our API Reference for more.
Installation
To install the package, you will need to be using Composer in your project.
The Convoy PHP SDK is not hard coupled to any HTTP Client such as Guzzle or any other library used to make HTTP requests. The HTTP Client implementation is based on PSR-18. This provides you with the convenience of choosing what PSR-7 and HTTP Client you want to use.
To get started quickly,
Generated API client (Convoy\Client)
The Convoy\Client namespace (src/Client/) is generated from Convoy's
OpenAPI spec via OpenAPI Generator and
covers the full /api/v1 surface with typed models (Guzzle-based):
Do not edit src/Client/ by hand; regenerate with ./scripts/generate.sh
(CI on frain-dev/convoy dispatches this when the spec changes). The
hand-written SDK below (incl. webhook verify) is never touched by generation.
Setup Client
Set up the client with your instance URL, API key, and project ID. Both the API key and project ID are available from your Project Settings page.
Your instance URL depends on where your project lives:
- Convoy Cloud (US):
https://us.getconvoy.cloud/api/v1 - Convoy Cloud (EU):
https://eu.getconvoy.cloud/api/v1 - Self-hosted:
https://your-instance/api/v1
Create an Endpoint
An endpoint represents a target URL to receive events.
Create a Subscription
Subscriptions route events from a source to an endpoint.
Sending an Event
To send an event, you'll need the uid from the endpoint we created earlier.
To fan an event out to all endpoints with the same owner_id, or broadcast to every endpoint in the project:
Verifying Webhook Signatures
Verify with the raw request body, before parsing it. Always check the return value: verify returns false for an invalid simple signature, and throws WebhookVerificationException for invalid advanced signatures and malformed headers.
Testing
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of convoy with dependencies
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
php-http/client-common Version ^2.5
php-http/discovery Version ^1.14
psr/http-client Version ^1.0
psr/http-client-implementation Version ^1.0
psr/http-factory Version ^1.0
symfony/options-resolver Version ^6.0