Download the PHP package getokta/okta-connect-sdk without Composer
On this page you can find all versions of the php package getokta/okta-connect-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download getokta/okta-connect-sdk
More information about getokta/okta-connect-sdk
Files in getokta/okta-connect-sdk
Package okta-connect-sdk
Short Description Official PHP SDK for Okta Connect — the omnichannel messaging platform (WhatsApp, email, social publishing, campaigns).
License MIT
Informations about the package okta-connect-sdk
Okta Connect PHP SDK
A framework-agnostic PHP client for the Okta Connect omnichannel platform:
WhatsApp messaging, transactional + bulk email, social publishing
(Telegram / X / Instagram / …) and broadcast campaigns — all under one client
surface. No Laravel dependency in the SDK code itself — a separate
getokta/okta-connect-sdk-laravel bridge package will be published later.
Installation
Quickstart
Tenant scope (read / write / send)
Send transactional email (receipts, OTPs, notifications) as one of your verified
sending domains — DKIM-signed server-side — read the send log, and manage
templates, broadcasts and the suppression list. Needs the send ability to send.
Bring your own SMTP. A domain connected via your own SMTP/provider (SES / Postmark / Resend) is usable immediately — no DNS verification needed; your server authenticates the mail. Platform-managed domains still publish SPF/DKIM/DMARC first.
Social publishing
Compose a post once and fan it out to one or more social channels. With a future
scheduledAt the post is scheduled; without one it's a draft.
Campaigns
Broadcast (bulk / drip) message campaigns: create a draft, then queue it to materialise the audience and start sending.
Platform-admin surface is not shipped in this public SDK. Privileged
platform.adminoperations (workspace/organization provisioning, token minting, embed-secret provisioning) are performed server-side by the platform operator and are intentionally excluded from this developer SDK to keep the public attack surface minimal. Call those endpoints directly from a trusted backend if you operate the platform.
Embedding the inbox (iframe)
Mint embed tokens and build iframe URLs natively — no hand-rolled JWTs. Obtain the shared secret from your platform operator (provisioned server-side), then:
Unknown ui_hide keys and out-of-range TTLs throw at mint time, so misconfigured
embeds fail loudly here instead of silently in the browser.
Idempotency
Mutating calls accept an optional Idempotency-Key header so safe retries are server-deduped:
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
baseUrl |
string |
required | Root URL of the Okta Connect API, e.g. https://connect.example.com. |
token |
string |
required | Sanctum personal-access token. Abilities determine which endpoints succeed. |
timeout |
int |
30 |
Request timeout in seconds. |
retries |
int |
2 |
Retry budget for 429 + 5xx responses (exponential backoff, base 250 ms). |
httpClient |
Psr\Http\Client\ClientInterface |
Guzzle | Inject a custom PSR-18 client (testing, alt transports). |
Error handling
All non-2xx responses raise typed exceptions extending Okta\Connect\WhatsApp\Exceptions\WhatsAppException:
| Exception | HTTP | Meaning |
|---|---|---|
AuthenticationException |
401 | Token missing / invalid / expired. |
AuthorizationException |
403 | Token lacks the required ability for this endpoint. |
NotFoundException |
404 | Resource doesn't exist or is not visible to the caller. |
ValidationException |
422 | Request body failed validation. Use ->errors() to read the field map. |
RateLimitException |
429 | Exceeded the per-token rate limit. Use ->retryAfter() to back off. |
ServerException |
5xx | Server error. SDK will retry per retries config before raising. |
WhatsAppException |
other | Base class — catch-all for unexpected status codes. |
Each exception exposes ->statusCode(), ->responseBody(), and the original PSR-7 response.
Running the tests
License
MIT — see LICENSE.
All versions of okta-connect-sdk with dependencies
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-message Version ^1.1 || ^2.0