Download the PHP package cuongcds/octivo-php without Composer
On this page you can find all versions of the php package cuongcds/octivo-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cuongcds/octivo-php
More information about cuongcds/octivo-php
Files in cuongcds/octivo-php
Package octivo-php
Short Description PHP SDK for the Octivo CRM Lead capture API
License MIT
Informations about the package octivo-php
cuongcds/octivo-php
PHP SDK for the Octivo CRM API. Lead capture is the first
resource covered — a public, unauthenticated endpoint used by landing pages/widgets to
create a row in crm_leads, scoped to a channel via its public source_id. More
Octivo CRM resources will be added to this SDK over time.
Install
Usage
At least one of email/phone must be provided; name falls back server-side to the
email/phone when omitted. Any extra field added via withMeta()/withMetaFields() is
stored server-side in the lead's meta JSON column.
Optional reCAPTCHA v3
If the target server has recaptcha_secret_key configured, pass a client-generated
token (action create_lead) via withRecaptchaToken(). It's ignored otherwise.
Custom HTTP transport
The client uses a cURL-based transport by default. Swap it by implementing
Octivo\Crm\Http\HttpClientInterface and passing it as the third constructor
argument to OctivoClient.
Examples
Runnable scripts are in examples/:
- examples/create-lead.php — full example with name, email,
phone, and extra
metafields. - examples/create-lead-minimal.php — minimal example with only a phone number.
- examples/create-lead-with-recaptcha.php —
passing a client-generated reCAPTCHA v3 token via
withRecaptchaToken().
Errors
Octivo\Crm\Exception\ValidationException— thrown client-side before any request is sent (missing email and phone).Octivo\Crm\Exception\ApiException— thrown when the API responds with an error (invalidsource_id, invalid phone/email, reCAPTCHA failure). CarriesgetStatusCode()andgetResponseBody().Octivo\Crm\Exception\OctivoException— base class, also thrown on transport failures (network error, timeout).
Reference
See docs/crm-lead-api.postman_collection.json for the underlying HTTP API this SDK wraps.
All versions of octivo-php with dependencies
ext-json Version *
ext-curl Version *